Core/FieldType/Metas/FormMapper.php
public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data)
    {
        $fieldDefinition = $data->fieldDefinition;
        $formConfig = $fieldForm->getConfig();

        $metasConfig = $this->configResolver->getParameter('fieldtype_metas', 'nova_ezseo');

        if (empty($data->value->metas)) {
            foreach ($metasConfig as $key => $meta) {
                $data->value->metas[$key] = new Meta($key, '');
            }
        }

        $fieldForm
            ->add(
                $formConfig->getFormFactory()->createBuilder()
                    ->create('value', MetasFieldType::class, [
                        'required' => $fieldDefinition->isRequired,
                        'label' => $fieldDefinition->getName($formConfig->getOption('languageCode')),
                    ])
                    ->setAutoInitialize(false)
                    ->getForm()
            );
    }
public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data)
    {
        $fieldDefinition = $data->fieldDefinition;
        $formConfig = $fieldForm->getConfig();

        $metasConfig = $this->configResolver->getParameter('fieldtype_metas', 'nova_ezseo');

        if (empty($data->value->metas)) {
            foreach ($metasConfig as $key => $meta) {
                $data->value->metas[$key] = new Meta($key, '');
            }
        }

        $fieldForm
            ->add(
                $formConfig->getFormFactory()->createBuilder()
                    ->create('value', MetasFieldType::class, [
                        'required' => $fieldDefinition->isRequired,
                        'label' => $fieldDefinition->getName($formConfig->getOption('languageCode')),
                    ])
                    ->setAutoInitialize(false)
                    ->getForm()
            );
    }
public function mapFieldValueForm ( FormInterface $ fieldForm , FieldData $ data ) { $ fieldDefinition = $ data -> fieldDefinition ; $ formConfig = $ fieldForm -> getConfig ( ) ; $ metasConfig = $ this -> configResolver -> getParameter ( 'fieldtype_metas' , 'nova_ezseo' ) ; if ( empty ( $ data -> value -> metas ) ) { foreach ( $ metasConfig as $ key => $ meta ) { $ data -> value -> metas [ $ key ] = new Meta ( $ key , '' ) ; } } $ fieldForm -> add ( $ formConfig -> getFormFactory ( ) -> createBuilder ( ) -> create ( 'value' , MetasFieldType :: class , [ 'required' => $ fieldDefinition -> isRequired , 'label' => $ fieldDefinition -> getName ( $ formConfig -> getOption ( 'languageCode' ) ) , ] ) -> setAutoInitialize ( false ) -> getForm ( ) ) ; }
Maps Field form to current FieldType.
Allows to add form fields for content edition.

@param FormInterface $fieldForm Form for the current Field.
@param FieldData $data Underlying data for current Field form.
Maps Field form to current FieldType . Allows to add form fields for content edition .