Return a DateField instance.

@param string $name       The name attribute of the date input.
@param array  $features   Custom field features - title, info.
@param array  $attributes Input html attributes.

@return \Themosis\Field\Fields\DateField
485838
public function date($name, array $features = [], array $attributes = [])
    {
        $properties = [
            'features' => $features,
            'atts' => array_merge(['class' => 'newtag'], $attributes, ['data-field' => 'date']),
            'name' => $name,
        ];

        return $this->make('Themosis\\Field\\Fields\\DateField', $properties);
    }
555453
public function changeField($name, array $attributes)
    {
        //Argument 1 must be a string
        Argument::i()->test(1, 'string');
        
        $this->changeFields[$name] = $attributes;
        return $this;
    }
135754
public function render($field_name, array $attributes = array())
    {
        $field = $this->field($field_name, $attributes);

        return $field->all();
    }
182554
public function addField(array $attributes)
    {
        $field = $this->fields()->create($attributes);

        $this->save();

        return $field;
    }
859743
public function addButton($name, $attributes = array()) {
	
		$control = new FormControlButton($name, $attributes);
		$this->addControl($control);
	
		return $control;
	
	}
440721
public function addSelect($name, $attributes = array()) {
	
		$control = new FormControlSelect($name, $attributes);
		$this->addControl($control);
	
		return $control;
	
	}
103220
public function addField($name, array $attributes)
    {
        //Argument 1 must be a string
        Argument::i()->test(1, 'string');
        
        $this->fields[$name] = $attributes;
        return $this;
    }
377774
final public function tag(string $name, array $attributes = [])
    {
        if ('' === $name) {
            throw new InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.');
        }

        foreach ($attributes as $attribute => $value) {
            if (null !== $value && !is_scalar($value)) {
                throw new InvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type.', $name, $attribute));
            }
        }

        $this->definition->addTag($name, $attributes);

        return $this;
    }
715871
public function mapData(array $attributes)
    {
        if (!$this->isSuperType)
        {
            return $this->newInstance();
        }
        else
        {
            if (!isset($attributes[$this->typeField]))
            {
                throw new \DomainException($this->typeField . ' not present in the records of a Super Model');
            }
            else
            {
                $class = $this->getClass($attributes[$this->typeField]);
                return new $class;
            }
        }
    }
759288
public function field($name) {
        $this->_fields['' . $name . ''] = new Field($name, $this->_name);

        return $this->_fields['' . $name . ''];
    }
429889
public static function text($name, $value, array $attributes = array())
    {
        $node = new Node\Text();

        if (!is_null($name)) {
            $attributes['name'] = $name;
        }

        if (!is_null($value)) {
            $attributes['value'] = $value;
        }

        return $node->render($attributes);
    }
1079678
public function text($name, $value = null, array $attributes = [])
    {
        $value = $this->getDefaultValue($name, $value);
        return $this->input('text', $name, $value, $attributes);
    }
1333011
public static function create($name, $attributes)
    {
        // Not supported is type=image, <button>, list, output, select-optgroup
        $types = [

            // Standard HTML 4.01
            'text'              => '\Anax\HTMLForm\FormElementText',
            'file'              => '\Anax\HTMLForm\FormElementFile',
            'password'          => '\Anax\HTMLForm\FormElementPassword',
            'hidden'            => '\Anax\HTMLForm\FormElementHidden',
            'textarea'          => '\Anax\HTMLForm\FormElementTextarea',
            'radio'             => '\Anax\HTMLForm\FormElementRadio',
            'checkbox'          => '\Anax\HTMLForm\FormElementCheckbox',
            'select'            => '\Anax\HTMLForm\FormElementSelect',
            'select-multiple'   => '\Anax\HTMLForm\FormElementSelectMultiple',
            'submit'            => '\Anax\HTMLForm\FormElementSubmit',
            'reset'             => '\Anax\HTMLForm\FormElementReset',
            'button'            => '\Anax\HTMLForm\FormElementButton',

            // HTML5
            'color'             => '\Anax\HTMLForm\FormElementColor',
            'date'              => '\Anax\HTMLForm\FormElementDate',
            'number'            => '\Anax\HTMLForm\FormElementNumber',
            'range'             => '\Anax\HTMLForm\FormElementRange',
            'tel'               => '\Anax\HTMLForm\FormElementTel',
            'email'             => '\Anax\HTMLForm\FormElementEmail',
            'url'               => '\Anax\HTMLForm\FormElementUrl',
            'search'            => '\Anax\HTMLForm\FormElementSearch',
            'file-multiple'     => '\Anax\HTMLForm\FormElementFileMultiple',
            'datetime'          => '\Anax\HTMLForm\FormElementDatetime',
            'datetime-local'    => '\Anax\HTMLForm\FormElementDatetimeLocal',
            'month'             => '\Anax\HTMLForm\FormElementMonth',
            'time'              => '\Anax\HTMLForm\FormElementTime',
            'week'              => '\Anax\HTMLForm\FormElementWeek',

            // Custom
            'search-widget'     => '\Anax\HTMLForm\FormElementSearchWidget',
            'checkbox-multiple' => '\Anax\HTMLForm\FormElementCheckboxMultiple',
            // Address
        ];

        // $attributes['type'] must contain a valid type creating an object
        // to succeed.
        $type = isset($attributes['type']) ? $attributes['type'] : null;
        if (!($type && isset($types[$type]))) {
            throw new Exception("Form element does not exists and can not be created: $name - $type");
        }
        return new $types[$type]($name, $attributes);
    }
1267304
public function getField($name)
    {
        return (isset($this->fields[$name])) ? $this->fields[$name] : false;
    }
821965
public function get_id_attribute( $name, $attributes ) {
		if ( array_key_exists( 'id', $this->global_attributes ) ) {
			return $this->global_attributes['id'];
		}

		if ( array_key_exists( 'id', $attributes ) ) {
			return $attributes['id'];
		}

		if ( in_array( $name, $this->labels ) ) {
			return $name;
		}

		return null;
	}
662572
public function addDate($name, $label = '', $format = null, $attr = [])
    {
        $c = new Column\Date($name, $label, $format, $attr);
        $this->addColumn($c);
        return $c;
    }
883052
public function textarea($name, $attributes = []) {
		list($attributes, $value)	= $this->_prepare($name, $attributes);
		$attributes					= $this->_arrayToAttributesString($attributes);
		$value						= $this->_escape($value);
		return "<textarea{$attributes}>{$value}</textarea>";
	}