Add HackzillaTicketBundle in your composer.json:
{
"require": {
"hackzilla/ticket-bundle": "~2.0@dev",
}
}
Specify your user class in your config, if you are using FOSUserBundle, then this will be exactly the same.
hackzilla_ticket:
user_class: AppBundle\Entity\User
Your user class needs to implement Hackzilla\Bundle\TicketBundle\Model\UserInterface
You should end up with a class similar to:
<?php
namespace AppBundle\Entity;
class User implements \Hackzilla\Bundle\TicketBundle\Model\UserInterface
{
}
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 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.
bin/console doctrine:schema:update --force