/** * @param string $name * @param string $type * @param string[] $attributes * @param string[] $options * * @return $this */ private function _addField($name, $type, $attributes = [], $options = []) { $field = new Field($name, $type); $field->setAttributes($attributes); $field->setOptions($options); $this->_fields[$name] = $field; return $this; }