Add HackzillaTicketBundle in your composer.json:
{
"require": {
"hackzilla/ticket-bundle": "~2.0@dev",
"friendsofsymfony/user-bundle": "~2.0@dev",
}
}
Specify your user class in your config, this will be exactly the same as user_class in FOSUserBundle.
hackzilla_ticket:
user_class: AppBundle\Entity\User
Your user class needs to implement Hackzilla\Bundle\TicketBundle\Model\UserInterface
You'll end up with a class like:
<?php
namespace AppBundle\Entity;
use FOS\UserBundle\Model\User as BaseUser;
class User extends BaseUser implements \Hackzilla\Bundle\TicketBundle\Model\UserInterface
{
}
Follow FOSUserBundle guide
Install Composer
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
Now tell composer to download the library by running the command:
$ composer update hackzilla/ticket-bundle
Composer will install the bundle into your project's vendor/hackzilla
directory.
Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new FOS\UserBundle\FOSUserBundle(),
new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Hackzilla\Bundle\TicketBundle\HackzillaTicketBundle(),
// ...
// Your application bundles
);
}
hackzilla_ticket:
resource: "@HackzillaTicketBundle/Resources/config/routing.yml"
prefix: /
or
hackzilla_ticket:
resource: "@HackzillaTicketBundle/Resources/config/routing/ticket.yml"
prefix: /ticket
All users can create tickets, even anonymous users. You can assign ROLE_TICKET_ADMIN to any user you want to be able to administer the ticketing system.
app/console doctrine:schema:update --force