for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Admin;
use Chamilo\CoreBundle\Entity\ToolResourceRight;
use Sonata\AdminBundle\Admin\AbstractAdmin;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Form\FormMapper;
/**
* Class ToolResourceRightAdmin.
*
* @package Chamilo\CoreBundle\Admin
*/
class ToolResourceRightAdmin extends AbstractAdmin
{
* {@inheritdoc}
protected function configureFormFields(FormMapper $formMapper)
$formMapper
->add('tool')
->add(
'role',
'choice',
['choices' => ToolResourceRight::getDefaultRoles()]
)
'mask',
['choices' => ToolResourceRight::getMaskList()]
;
}
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
$datagridMapper
->add('role')
protected function configureListFields(ListMapper $listMapper)
$listMapper
->addIdentifier('id')
->addIdentifier('role')
->addIdentifier('mask')