adapt elements to new interface definition

This commit is contained in:
2016-01-31 23:43:53 +01:00
parent e79aebabff
commit e616626cc2
6 changed files with 47 additions and 15 deletions

View File

@@ -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);
}
}