58 $this->_factoryElement = $factoryElement;
59 $this->_factoryCollection = $factoryCollection;
60 parent::__construct(
$data);
95 if (empty($this->_elements)) {
96 $this->_elements = $this->_factoryCollection->create([
'container' => $this]);
111 $this->setDisabled($readonly);
112 $this->
setData(
'readonly_disabled', $readonly);
114 $this->
setData(
'readonly', $readonly);
117 $element->setReadonly($readonly, $useDisabled);
152 if (isset($this->_types[
$type])) {
184 $element = $this->_factoryElement->create(
'fieldset', [
'data' =>
$config]);
200 $element = $this->_factoryElement->create(
'column', [
'data' =>
$config]);
201 $element->setForm($this)->setId($elementId);
216 $res[
'config'] = $this->
getData();
217 $res[
'formElements'] = [];
219 $res[
'formElements'][] =
$element->toArray();
233 $this->customAttributes[$key] =
$value;
246 public function serialize($keys = [], $valueSeparator =
'=', $fieldSeparator =
' ',
$quote =
'"')
250 $keys = array_keys($this->_data);
254 $keys = array_merge($keys, array_keys(array_diff($this->customAttributes,
$customAttributes)));
256 foreach ($this->_data as $key =>
$value) {
257 if (in_array($key, $keys)) {
266 return implode($fieldSeparator,
$data);
getData($key='', $index=null)
setData($key, $value=null)