Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 /**
  * 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);
 }
Exemplo n.º 3
0
 /**
  * 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;
 }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 5
0
 /**
  * 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;
 }