Пример #1
0
 /**
  * Generally function to create a new custom emotion component field.
  *
  * @param array $data
  *
  * @return Field
  */
 public function createField(array $data)
 {
     $data += array('fieldLabel' => '', 'valueType' => '', 'store' => '', 'supportText' => '', 'helpTitle' => '', 'helpText' => '', 'defaultValue' => '', 'displayField' => '', 'valueField' => '', 'allowBlank' => false);
     $field = new Field();
     $field->fromArray($data);
     $field->setComponent($this);
     $this->fields->add($field);
     return $field;
 }
Пример #2
0
 /**
  * Generally function to create a new custom emotion component field.
  *
  * @param array $data
  *
  * @return Field
  */
 public function createField(array $data)
 {
     $data += array('fieldLabel' => '', 'valueType' => '', 'store' => '', 'supportText' => '', 'helpTitle' => '', 'helpText' => '', 'defaultValue' => '', 'displayField' => '', 'valueField' => '', 'allowBlank' => false, 'position' => $this->getMaxPositionValue());
     $this->maxFieldPositionValue = max($data['position'], $this->maxFieldPositionValue) + 1;
     $field = new Field();
     $field->fromArray($data);
     $field->setComponent($this);
     $this->fields->add($field);
     return $field;
 }