public function __construct($name) { parent::__construct($name); $this->attributes['type'] = 'submit'; $this->attributes['value'] = ''; $this->rules['value'] = 'optional'; }
/** * Constructor * Add a list item validator * @param Form_Field $field */ public function __construct($field) { parent::__construct($field); $this->items = array(); $validator = new \Foundation\Form\Validator\ChoiceInList($this, null); $this->addValidator($validator); }
/** * Constructor * * Instantiate the form input element, defaults to text * * @param string $name * @param string $type * @param string $value * @param string $indent * @return Input */ public function __construct($name, $type = 'text', $value = null, $indent = null) { parent::__construct($this->type, null, null, false, $indent); $this->setAttributes(['type' => $type, 'name' => $name, 'id' => $name, 'value' => $value]); $this->setValue($value); $this->setName($name); }
public function __construct($name) { parent::__construct($name); $this->attributes['type'] = 'checkbox'; $this->attributes['value'] = '1'; $this->rules['value'] = 'optional'; }
public function __construct($name) { parent::__construct($name); $this->attributes['type'] = 'text'; $this->attributes['value'] = ''; $this->rules['value'] = 'required|trim'; }
/** * @param string $name * @param bool $abstract * @param string|PhpClass|null $extends * @param string[]|PhpClass[] $interfaces */ public function __construct($name, $abstract = false, $extends = null, array $interfaces = array()) { parent::__construct($name); $this->setAbstract($abstract); $this->setExtends($extends); $this->setInterfaces($interfaces); }
public function __construct($name, $type = 'text') { parent::__construct($name); $this->attributes['type'] = $type; $this->attributes['value'] = []; $this->rules['value[]'] = 'required|trim'; }
public function __construct($size = 1) { if (is_string($size)) { $size = substr($size, 1, 1); } $this->tag = $this->tag . $size; parent::__construct(); }
/** * Constructor */ public function __construct($field) { parent::__construct($field); $this->attributes['cols'] = 'cols'; $this->attributes['rows'] = 'rows'; $this->attributes['disabled'] = 'disabled'; $this->attributes['readonly'] = 'readonly'; }
public function __construct($placeholder = null, $rows = null) { parent::__construct(); if (isset($placeholder)) { parent::setAttribute((new Attribute('placeholder'))->append($placeholder)); } if (isset($rows)) { parent::setAttribute((new Attribute('rows'))->append($rows)); } }
/** * Constructor * Make $value an array */ public function __construct(\Foundation\Form\Field $field) { parent::__construct($field); $this->items = array(); $this->value = array(); $this->totalItems = false; $this->requiredItems = false; $validator = new \Foundation\Form\Validator\RankingList($this, null); $this->addValidator($validator); }
public function __construct($href, $rel, $type = null) { parent::__construct(); parent::setAttribute((new Attribute('href'))->append($href)); parent::setAttribute((new Attribute('rel'))->append($rel)); if (isset($type)) { parent: setAttribute((new Attribute('type'))->append($type)); } }
public function __construct($type, $name, $readonly = false, $disabled = false) { parent::__construct(); parent::setAttribute('type', $type); parent::setAttribute('name', $name); if ($readonly) { parent::setAttribute((new Attribute('readonly'))->append('readonly')); } if ($disabled) { parent::setAttribute((new Attribute('disabled'))->append('disabled')); } }
/** * Constructor * Check the API keys */ public function __construct($field) { if (!self::$privateApiKey) { throw new \Foundation\Exception('Private API Key not set for reCAPTCHA library.'); } if (!self::$publicApiKey) { throw new \Foundation\Exception('Public API Key not set for reCAPTCHA library.'); } //move the static keys into local space for ease of use $this->publicKey = self::$publicApiKey; //use the secure server $this->server = self::API_SECURE_SERVER; parent::__construct($field); $this->addValidator(new \Foundation\Form\Validator\Captcha($this, self::$privateApiKey)); }
public function __construct($src = null, $type = null, $defer = false, $async = false) { parent::__construct(); if (isset($src)) { parent::setAttribute((new Attribute('src'))->append($src)); } if (isset($type)) { parent::setAttribute((new Attribute('type'))->append($type)); } if ($defer) { parent::setAttribute((new Attribute('defer'))->append($defer)); } if ($async) { parent::setAttribute((new Attribute('async'))->append($async)); } }
/** * Constructor * * Instantiate the button form element. * * @param string $name * @param string $value * @param string $indent * @return Button */ public function __construct($name, $value = null, $indent = null) { parent::__construct($this->type, $value, null, false, $indent); $this->setAttributes(['name' => $name, 'id' => $name]); if (strtolower($name) == 'submit') { $this->setAttribute('type', 'submit'); } else { if (strtolower($name) == 'reset') { $this->setAttribute('type', 'reset'); } else { $this->setAttribute('type', 'button'); } } $this->setValue($value); $this->setName($name); }
/** * @param string $name * @param string $access */ public function __construct($name, $access = self::ACCESS_PUBLIC) { parent::__construct($name); $this->setAccess($access); }
public function __construct($data = array()) { parent::__construct('input', $data); }
/** * @param string $name * @param string $content * @param int $maxLength */ public function __construct($name, $content, $maxLength = self::MAX_LENGTH) { parent::__construct($name); $this->setContent($content)->setMaxLength($maxLength); }
public function __construct($datetime) { parent::__construct(); parent::setAttribute((new Attribute('datetime'))->append($datetime)); }
public function __construct($name) { parent::__construct($name); $this->attributes['type'] = 'password'; $this->attributes['value'] = ''; }
public function __construct($title) { parent::__construct(); parent::setAttribute((new Attribute('title'))->append($title)); }
public function __construct($name) { parent::__construct($name); $this->rules['value'] = 'required|trim'; }
public function __construct($src) { parent::__construct(); parent::setAttribute((new Attribute('src'))->append($src)); }
/** * @param array $annotations */ public function __construct(array $annotations = array()) { parent::__construct('_'); $this->setAnnotations($annotations); }
public function __construct($name) { parent::__construct($name); }
public function __consturct(AbstractElement\DescriptionTerm $term = null, AbstractElement\DescriptionDefinition $definition = null) { parent::__construct(); parent::add($term); parent::add($definition); }
public function __construct($href) { parent::__construct(); $this->setAttribute((new Attribute('href'))->append($href)); }