public function show() { $control = array("value" => null); if (isset($this->view->{$this->name})) { $this->view->{$this->name} = array_merge($control, $this->view->{$this->name}); } else { $this->view->{$this->name} = $control; } return parent::show(); }
/** * Constructor * * @param AM_Controller_Action $actionController Controller * @param string $name Component name * @param string $title Title of control * @param array $validationRules Validation rules. Each rule is array : * [validationtype, param1, param2,...] * type can be: require, integer, float, numeric, maximum value, minimum value, * maximum length, minimum length, range, range length, regexp, email, function */ public function __construct(AM_Controller_Action $actionController, $name, $title = null, array $validationsRules = null) { parent::__construct($actionController, $name, $title, $validationsRules); }
/** * Add new control * * @param Volcano_Component_Control $control */ public function addControl(Volcano_Component_Control $control) { $name = $control->getName(); if (array_key_exists($name, $this->controls)) { require_once 'Volcano/Exception.php'; throw new Volcano_Exception($this->localizer->translate('Control with name %s exists in record %s', $name, $this->getName())); } $this->controls[$name] = $control; }
public function __construct(Zend_Controller_Action $actionController, $name, $title = null, $validationsRules = null, $fileFolder, $autoCreateFolder = false) { parent::__construct($actionController, $name, $title, $validationsRules); $this->fileFolder = $fileFolder; $this->autoCreateFolder = $autoCreateFolder; }
/** * Constructor * * @param AM_Controller_Action $actionController Controller * @param string $name Component name * @param string $title Title of control * @param array $validationRules Validation rules. Each rule is array : * [validationtype, param1, param2,...] * type can be: require, integer, float, numeric, maximum value, minimum value, * maximum length, minimum length, range, range length, regexp, email, function * @param string $dbField Name of binded field */ public function __construct(AM_Controller_Action $actionController, $name, $title = null, array $validationsRules = null, $dbField = null) { parent::__construct($actionController, $name, $title, $validationsRules); $this->dbField = $dbField ? $dbField : $name; }