From b07d87615749348a459192bbd199d59fc9a975c4 Mon Sep 17 00:00:00 2001 From: nobohan Date: Wed, 4 Apr 2018 18:17:51 +0200 Subject: [PATCH] fix deprecations: use fqcn --- CustomFields/CustomFieldTitle.php | 5 +++-- Form/Type/CustomFieldsTitleType.php | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CustomFields/CustomFieldTitle.php b/CustomFields/CustomFieldTitle.php index 319f899c3..5d2d10cd8 100644 --- a/CustomFields/CustomFieldTitle.php +++ b/CustomFields/CustomFieldTitle.php @@ -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 diff --git a/Form/Type/CustomFieldsTitleType.php b/Form/Type/CustomFieldsTitleType.php index be490a5f3..276d9eaff 100644 --- a/Form/Type/CustomFieldsTitleType.php +++ b/Form/Type/CustomFieldsTitleType.php @@ -1,20 +1,20 @@ - * + * * 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 . */ @@ -30,9 +30,9 @@ class CustomFieldsTitleType extends AbstractType } - public function getName() + public function getBlockPrefix() { return 'custom_field_title'; } -} \ No newline at end of file +}