1 | <?php |
||
23 | class Transformation extends FormTransformation |
||
24 | { |
||
25 | /** |
||
26 | * @var DataObject |
||
27 | */ |
||
28 | private $original = null; |
||
29 | |||
30 | public function __construct(DataObject $original) |
||
35 | |||
36 | /** |
||
37 | * Returns the original DataObject attached to the Transformation |
||
38 | * |
||
39 | * @return DataObject |
||
40 | */ |
||
41 | public function getOriginal() |
||
45 | |||
46 | public function transformFormField(FormField $field) |
||
52 | |||
53 | /** |
||
54 | * Transform a translatable CheckboxField to show the field value from the default language |
||
55 | * in the label. |
||
56 | * |
||
57 | * @param FormField $nonEditableField The readonly field to contain the original value |
||
58 | * @param FormField $originalField The original editable field containing the translated value |
||
59 | * @return CheckboxField The field with a modified label |
||
60 | */ |
||
61 | protected function transformCheckboxField(CheckboxField_Readonly $nonEditableField, CheckboxField $originalField) |
||
77 | |||
78 | /** |
||
79 | * Transform a translatable field to show the field value from the default language |
||
80 | * DataObject below the translated field. |
||
81 | * |
||
82 | * This is a fallback function which handles field types that aren't transformed by |
||
83 | * $this->transform{FieldType} functions. |
||
84 | * |
||
85 | * @param FormField $nonEditableField The readonly field to contain the original value |
||
86 | * @param FormField $originalField The original editable field containing the translated value |
||
87 | * @return CompositeField The transformed field |
||
88 | */ |
||
89 | protected function baseTransform($nonEditableField, $originalField) |
||
109 | } |
||
110 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.