mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix deprecations: getName -> getBlockPrefix in Forms
This commit is contained in:
parent
b84a77d9de
commit
96e1b1db4d
@ -35,7 +35,7 @@ class ActivityReasonCategoryType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'chill_activitybundle_activityreasoncategory';
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ class ActivityReasonType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'chill_activitybundle_activityreason';
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ class ActivityType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'chill_activitybundle_activity';
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class ActivityTypeType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'chill_activitybundle_activitytype';
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class TranslatableActivityReason extends AbstractType
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'translatable_activity_reason';
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ class TranslatableActivityReasonCategory extends AbstractType
|
||||
$this->requestStack = $requestStack;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'translatable_activity_reason_category';
|
||||
}
|
||||
|
@ -2,20 +2,20 @@
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
*
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
* <http://www.champs-libres.coop>, <info@champs-libres.coop>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@ -37,15 +37,15 @@ use Chill\ActivityBundle\Entity\ActivityType;
|
||||
*/
|
||||
class TranslatableActivityType extends AbstractType
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @var TranslatableStringHelper
|
||||
*/
|
||||
protected $translatableStringHelper;
|
||||
|
||||
|
||||
protected $activityTypeRepository;
|
||||
|
||||
|
||||
public function __construct(
|
||||
TranslatableStringHelper $helper,
|
||||
EntityRepository $activityTypeRepository
|
||||
@ -54,30 +54,30 @@ class TranslatableActivityType extends AbstractType
|
||||
$this->translatableStringHelper = $helper;
|
||||
$this->activityTypeRepository = $activityTypeRepository;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'translatable_activity_type';
|
||||
}
|
||||
|
||||
|
||||
public function getParent()
|
||||
{
|
||||
return EntityType::class;
|
||||
}
|
||||
|
||||
|
||||
public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder, array $options) {
|
||||
/* @var $qb \Doctrine\ORM\QueryBuilder */
|
||||
$qb = $options['query_builder'];
|
||||
|
||||
|
||||
if ($options['active_only'] === true) {
|
||||
$qb->where($qb->expr()->eq('at.active', ':active'));
|
||||
$qb->setParameter('active', true, \Doctrine\DBAL\Types\Type::BOOLEAN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
|
||||
|
||||
$resolver->setDefaults(
|
||||
array(
|
||||
'class' => 'ChillActivityBundle:ActivityType',
|
||||
|
Loading…
x
Reference in New Issue
Block a user