fix deprecations: use fqcn

This commit is contained in:
nobohan 2018-04-04 18:17:51 +02:00
parent 7edd6affe4
commit b07d876157
2 changed files with 9 additions and 8 deletions

View File

@ -28,6 +28,7 @@ use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Bundle\TwigBundle\TwigEngine;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Chill\CustomFieldsBundle\Form\Type\CustomFieldsTitleType;
class CustomFieldTitle extends AbstractCustomField
{
@ -58,7 +59,7 @@ class CustomFieldTitle extends AbstractCustomField
public function buildForm(FormBuilderInterface $builder, CustomField $customField)
{
$builder->add($customField->getSlug(), 'custom_field_title', array(
$builder->add($customField->getSlug(), CustomFieldsTitleType::class, array(
'label' => false,
'attr' => array(
'class' => 'cf-title',
@ -105,7 +106,7 @@ class CustomFieldTitle extends AbstractCustomField
array(
'choices' => array(
'Main title' => self::TYPE_TITLE,
'Subtitle' => self::TYPE_SUBTITLE
'Subtitle' => self::TYPE_SUBTITLE
),
'label' => 'Title level',
'choices_as_values' => true

View File

@ -1,20 +1,20 @@
<?php
/*
* Chill is a software for social workers
* Chill is a software for social workers
*
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.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/>.
*/
@ -30,9 +30,9 @@ class CustomFieldsTitleType extends AbstractType
}
public function getName()
public function getBlockPrefix()
{
return 'custom_field_title';
}
}
}