Source of file ProxyArrayListField.php
Size: 0,622 Bytes - Last Modified: 2021-12-23T11:00:20+00:00
/var/www/docs.ssmods.com/process/src/src/Form/ProxyArrayListField.php
1234567891011121314151617181920212223 | <?php declare(strict_types=1); namespace zauberfisch\SerializedDataObject\Form; use SilverStripe\Forms\CompositeField; class ProxyArrayListField extends CompositeField { public function __construct($name, $title, $recordClassName) { $_this = $this; parent::__construct([ (new ArrayListField($name, $title, $recordClassName)) ->setRecordFieldsUpdateCallback(function ($fields, $listField, $record = null) use ($_this) { foreach ($fields as $field) { $_this->push(new ProxyArrayListField_FieldProxy($field)); } return $fields; }), ]); $this->setName("{$name}_proxy_holder"); } } |