/**
  * Add extra options to data
  */
 public function getSchemaDataDefaults()
 {
     $defaults = parent::getSchemaDataDefaults();
     $defaults['attributes']['type'] = $this->getUseButtonTag() ? 'button' : 'submit';
     $defaults['data']['icon'] = $this->getIcon();
     return $defaults;
 }
 /**
  * Set textarea specific schema data
  */
 public function getSchemaDataDefaults()
 {
     $data = parent::getSchemaDataDefaults();
     $data['data']['rows'] = $this->getRows();
     $data['data']['columns'] = $this->getColumns();
     return $data;
 }
 /**
  * Merge child field data into this form
  */
 public function getSchemaDataDefaults()
 {
     $defaults = parent::getSchemaDataDefaults();
     $children = $this->getChildren();
     if ($children && $children->count()) {
         $childSchema = [];
         /** @var FormField $child */
         foreach ($children as $child) {
             $childSchema[] = $child->getSchemaData();
         }
         $defaults['children'] = $childSchema;
     }
     return $defaults;
 }
 public function testGetSchemaDataDefaults()
 {
     $field = new FormField('MyField');
     $schema = $field->getSchemaDataDefaults();
     $this->assertInternalType('array', $schema);
 }