public function transformFormField(FormField $field)
    {
        $newfield = $field->performReadOnlyTransformation();

        $fieldname = $field->getName();
        if ($this->original->isLocalizedField($fieldname)) {
            $field->setName($this->original->getLocalizedFieldName($fieldname));
            $value = $this->original->getLocalizedValue($fieldname);
            if ($value instanceof DBField) {
                $field->setValue($value->getValue());
            } else {
                $field->setValue($value);
            }
        }

        return $this->baseTransform($newfield, $field, $fieldname);
    }
public function transformFormField(FormField $field)
    {
        $newfield = $field->performReadOnlyTransformation();

        $fieldname = $field->getName();
        if ($this->original->isLocalizedField($fieldname)) {
            $field->setName($this->original->getLocalizedFieldName($fieldname));
            $value = $this->original->getLocalizedValue($fieldname);
            if ($value instanceof DBField) {
                $field->setValue($value->getValue());
            } else {
                $field->setValue($value);
            }
        }

        return $this->baseTransform($newfield, $field, $fieldname);
    }
public function transformFormField ( FormField $ field ) { $ newfield = $ field -> performReadOnlyTransformation ( ) ; $ fieldname = $ field -> getName ( ) ; if ( $ this -> original -> isLocalizedField ( $ fieldname ) ) { $ field -> setName ( $ this -> original -> getLocalizedFieldName ( $ fieldname ) ) ; $ value = $ this -> original -> getLocalizedValue ( $ fieldname ) ; if ( $ value instanceof DBField ) { $ field -> setValue ( $ value -> getValue ( ) ) ; } else { $ field -> setValue ( $ value ) ; } } return $ this -> baseTransform ( $ newfield , $ field , $ fieldname ) ; }
Transform a given form field into a composite field, where the translation is editable and the original value
is added as a read-only field.
@param FormField $field
@return CompositeField
Transform a given form field into a composite field where the translation is editable and the original value is added as a read - only field .