mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
adapt elements to new interface definition
This commit is contained in:
@@ -25,6 +25,8 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Doctrine\ORM\Query;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Chill\PersonBundle\Export\Declarations;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -38,7 +40,7 @@ class CountPerson implements ExportInterface
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return 'person';
|
||||
return Declarations::PERSON_TYPE;
|
||||
}
|
||||
|
||||
public function getDescription()
|
||||
@@ -77,7 +79,7 @@ class CountPerson implements ExportInterface
|
||||
return $qb;
|
||||
}
|
||||
|
||||
public function getResult($qb, $data)
|
||||
public function getResult(QueryBuilder $qb, $data)
|
||||
{
|
||||
return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
@@ -101,7 +103,7 @@ class CountPerson implements ExportInterface
|
||||
|
||||
public function getAllowedFormattersTypes()
|
||||
{
|
||||
return array('tabular');
|
||||
return array(FormatterInterface::TYPE_TABULAR);
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {
|
||||
@@ -114,7 +116,7 @@ class CountPerson implements ExportInterface
|
||||
|
||||
public function supportsModifiers()
|
||||
{
|
||||
return array('person');
|
||||
return array(Declarations::PERSON_TYPE);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user