/** * @param mixed $value */ public function __construct($value = null) { parent::__construct($value); $this->defaultValue = self::EUR; $keys = serialize(array_keys(self::getAvailableValues())); $this->validationRules = ['required', "in_array({$keys})"]; }
public function __construct($key, $title, array $fields = array()) { parent::__construct($key, $title); foreach ($fields as $field) { $this->addField($field); } }
public function __construct($attributes) { parent::__construct($attributes); if (!isset($attributes['textarea_name'])) { $this->attributes['textarea_name'] = ''; } if (!isset($attributes['media_buttons'])) { $this->attributes['media_buttons'] = true; } if (!isset($attributes['wpautop'])) { $this->attributes['wpautop'] = true; } if (!isset($attributes['rows'])) { $this->attributes['rows'] = 15; } if (!isset($attributes['editor_class'])) { $this->attributes['editor_class'] = ''; } if (!isset($attributes['teeny'])) { $this->attributes['teeny'] = false; } if (!isset($attributes['dfw'])) { $this->attributes['dfw'] = false; } if (!isset($attributes['tinymce'])) { $this->attributes['tinymce'] = true; } if (!isset($attributes['quicktags'])) { $this->attributes['quicktags'] = true; } }
public function __construct($name, $value, $expire = 0) { parent::__construct(); $this->name = $name; $this->value = $value; $this->expire = $expire; }
/** * @param string $label * @param string $content */ public function __construct(string $label, string $content = null) { parent::__construct('<div>', null, $label); if ($content) { $this->setContent($content); } }
public function __construct($attributes) { parent::__construct($attributes); if (!isset($this->attributes['inputvalue'])) { $this->attributes['inputvalue'] = 1; } }
/** * @param string $name * @param string $value */ public function __construct(string $name, string $value = null) { parent::__construct('<input />', $name); $this->getField()->addAttribute('type', 'hidden'); if (!is_null($value)) { $this->setValue($value); } }
public function __construct($props) { parent::__construct($props); session_start(); if (!isset($_POST[$this->name])) { $this->captcha = $this->generate_captcha(); } }
public function __construct($itemId, $config) { if (array_key_exists('tag', $config)) { $this->tag = $config['tag']; unset($config['tag']); } parent::__construct($itemId, $config); }
/** * @param string $name * @param string $label * @param string $submitValue */ public function __construct(string $name, string $label, string $submitValue = null) { parent::__construct('<input />', $name, $label); $this->getField()->addAttribute('type', 'radio'); if ($name) { $this->setName($name); } $this->setSubmitValue($submitValue); }
public function __construct($attributes) { parent::__construct($attributes); // if(!empty($this->attributes['specifyoptions'])) // { // $this->factory = new FieldFactory(); // foreach($this->attributes['specifyoptions'] as $val => $field) // { // $this->attributes['extrafields'][$val] = $this->factory->create($field); // } // } }
public function __construct($attributes) { parent::__construct($attributes); //default $this->attributes['suggestedWidth'] = !isset($attributes['suggestedWidth']) ? 300 : $attributes['suggestedWidth']; $this->attributes['suggestedHeight'] = !isset($attributes['suggestedHeight']) ? 200 : $attributes['suggestedHeight']; $this->attributes['allowCropping'] = !isset($attributes['allowCropping']) ? true : $attributes['allowCropping']; $this->attributes['flexWidth'] = !isset($attributes['flexWidth']) ? 1 : $attributes['flexWidth']; $this->attributes['flexHeight'] = !isset($attributes['flexHeight']) ? 1 : $attributes['flexHeight']; $this->attributes['flexWidth'] = (int) $this->attributes['flexWidth']; $this->attributes['flexHeight'] = (int) $this->attributes['flexHeight']; }
public function __construct($attributes) { parent::__construct($attributes); if (!isset($attributes['step'])) { $this->attributes['step'] = 1; } if (!isset($attributes['min'])) { $this->attributes['min'] = 0; } if (!isset($attributes['max'])) { $this->attributes['max'] = 10; } }
public function __construct($itemId, $config) { parent::__construct($itemId, $config); if (array_key_exists('options', $config)) { $this->options = $config['options']; } if (array_key_exists('option-keys', $config)) { $this->optionKeys = $config['option-keys']; } if (is_string($this->value)) { $this->value = [$this->value]; } }
/** * @param mixed $value */ public function __construct($value = null) { parent::__construct($value); $this->validationRules = ['url', 'max_length(250)']; }
public function __construct($key, $title, array $options, array $attr = array()) { parent::__construct($key, $title, $attr); $this->options = $options; }
/** * @param mixed $value */ public function __construct($value = null) { parent::__construct($value); $this->validationRules = ['required']; }
/** * @param mixed $value */ public function __construct($value = null) { parent::__construct($value); $this->validationRules = ['required', 'max_length(12)', 'match_regex(/^[\\d]{4}[A-Za-z0-9]+$/)']; }
/** * Constructor * * @param string $serializerType Field type * @param string $fieldName Field name * @param string $exposedName Exposed name * @param bool $readOnly Read only * @param bool $required Is required */ public function __construct($serializerType, $fieldName, $exposedName, $readOnly, $required) { $this->serializerType = $serializerType; parent::__construct($fieldName, $exposedName, $readOnly, $required); }
/** * Public constructor * * @param string $label Label */ public function __construct($label) { parent::__construct('', $label); }
/** * @param string $content * @param string $label */ public function __construct(string $content, string $label = null) { parent::__construct('<button>', null, $label); $this->getField()->setContent($content); $this->getField()->addAttribute('type', self::TYPE_SUBMIT); }
/** * Initializes the IntegerField. * * @param int $value */ public function __construct($value) { parent::__construct($value, 'int'); }
/** * Constructor * * @param Document $document Document type * @param string $fieldName Field name * @param string $exposedName Exposed name * @param bool $readOnly Read only * @param bool $required Is required */ public function __construct(Document $document, $fieldName, $exposedName, $readOnly, $required) { $this->document = $document; parent::__construct($fieldName, $exposedName, $readOnly, $required); }
/** * @param string $name * @param string $label */ public function __construct(string $name, string $label = null) { parent::__construct('<input />', $name, $label); $this->getField()->addAttribute('type', 'tel'); }
/** * @param mixed $value */ public function __construct($value = null) { parent::__construct($value); $this->defaultValue = '1'; $this->validationRules = ['numeric', 'max_length(3)']; }
/** * @param mixed $value */ public function __construct($value = null) { parent::__construct($value); $this->validationRules = ['numeric', 'exact_length(5)']; }
/** * Constructor * * @param string $type Field type * @param string $fieldName Field name * @param string $exposedName Exposed name * @param bool $readOnly Read only * @param bool $required Is required */ public function __construct($type, $fieldName, $exposedName, $readOnly, $required) { $this->type = $type; parent::__construct($fieldName, $exposedName, $readOnly, $required); }
/** * @param mixed $value */ public function __construct($value = null) { parent::__construct($value); $this->validationRules = ['required', 'numeric', 'max_length(9)']; }
/** * Constructor. * * Initializes required field data to null. * * @return void */ public function __construct() { parent::__construct(array('key' => null, 'name' => null)); }
/** * {@inheritdoc} */ public function __construct($value) { $value = str_ireplace(array('SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'), range(0, 6), $value); parent::__construct($value); }