function __construct($id, $css, $label, $type, $text = "") { parent::__construct($id, $css); $this->text = $text; $this->type = $type; $this->label = $label; }
/** * @param array $params */ public function __construct(array $params) { $requiredParams = ['text' => '', 'type' => '', 'classes' => []]; extract(array_merge($requiredParams, $params)); parent::__construct($classes); $this->text = $text; $this->type = $type; }
/** * @param array $params */ public function __construct(array $params) { $requiredParams = ['type' => 'text', 'label' => '', 'placeholder' => '', 'templateName' => '', 'required' => false, 'classes' => []]; extract(array_merge($requiredParams, $params)); parent::__construct($classes); $this->type = $type; $this->label = $label; $this->placeholder = $placeholder; $this->templateName = $templateName; $this->required = $required === 'true' ? 'required' : ''; }
/** * @param array $params */ public function __construct(array $params) { $requiredParams = ['type' => 'checkbox', 'label' => '', 'templateName' => '', 'required' => false, 'multiple' => false, 'classes' => []]; extract(array_merge($requiredParams, $params)); parent::__construct($classes); $this->type = $type; $this->label = $label; $this->values = $values; $this->required = $required === 'true' ? 'required' : ''; $this->multiple = $multiple === 'true' ? 'multiple' : ''; $this->templateName = $templateName; }
/** * * @param string $id * @param callback $onSubmit Called when the form is valid * @param callback $onError Called when the form is not valid */ public function __construct($id, $onSubmit = null, $onError = null) { parent::__construct($id); if ($onSubmit != null) { Args::callBack($onSubmit, 'onSubmit'); } if ($onError != null) { Args::callBack($onError, 'onError'); } $this->onSubmit = $onSubmit; $this->onError = $onError; }
/** * * @param string $id * @param array $choices * @param Model $model */ public function __construct($id, $choices, ChoiceRenderer $choiceRenderer = null, Model $model = null, $isDisabled = null) { parent::__construct($id, $model); Args::isArray($choices, 'choices'); $this->choices = $choices; if ($choiceRenderer == null) { $choiceRenderer = new ChoiceRenderer(); } $this->choiceRenderer = $choiceRenderer; if ($isDisabled != null) { Args::callBackArgs($isDisabled, 2, 'isDisabled'); $this->isDisabled = $isDisabled; } }
/** * @param array $params */ public function __construct(array $params) { $requiredParams = ['type' => 'checkbox', 'label' => '', 'value' => '', 'templateName' => '', 'required' => false, 'classes' => []]; extract(array_merge($requiredParams, $params)); if (!is_array($classes)) { $classes = []; } //$classes[] = 'form-control'; parent::__construct($classes); $this->type = $type; $this->label = $label; $this->value = $value; $this->required = $required === 'true' ? 'required' : ''; $this->templateName = $templateName; $this->classes = implode(' ', $classes); }
function __construct($vo) { if (is_null($vo)) { throw new InvalidDataException(); } parent::__construct(); $this->api_method_to_call = NULL; if (is_array($vo)) { for ($a = 0; $a < sizeof($vo); $a++) { $fields = json_decode($vo[$a]->__toString()); foreach ($fields as $k => $v) { $caption = ucwords(str_replace("_", " ", $k)); parent::addField($k, $caption, "text", $v, $k); } } } else { $fields = json_decode($vo->__toString()); foreach ($fields as $k => $v) { $caption = ucwords(str_replace("_", " ", $k)); parent::addField($k, $caption, "text", $v, $k); } } }
public function __construct($id, FileModel $model = null) { parent::__construct($id, $model); }
function __construct($id, $css, $text) { parent::__construct($id, $css); $this->text = $text; }
function __construct($id, $css, $label, $items) { parent::__construct($id, $css); $this->items = $items; $this->label = $label; }