IssueForm::__construct PHP Method

__construct() public method

Constructor.
public __construct ( $issue = null )
    function __construct($issue = null)
    {
        parent::__construct('controllers/grid/issues/form/issueForm.tpl');
        $this->addCheck(new FormValidatorCustom($this, 'showVolume', 'optional', 'editor.issues.volumeRequired', create_function('$showVolume, $form', 'return !$showVolume || $form->getData(\'volume\') ? true : false;'), array($this)));
        $this->addCheck(new FormValidatorCustom($this, 'showNumber', 'optional', 'editor.issues.numberRequired', create_function('$showNumber, $form', 'return !$showNumber || $form->getData(\'number\') ? true : false;'), array($this)));
        $this->addCheck(new FormValidatorCustom($this, 'showYear', 'optional', 'editor.issues.yearRequired', create_function('$showYear, $form', 'return !$showYear || $form->getData(\'year\') ? true : false;'), array($this)));
        $this->addCheck(new FormValidatorCustom($this, 'showTitle', 'optional', 'editor.issues.titleRequired', create_function('$showTitle, $form', 'return !$showTitle || implode(\'\', $form->getData(\'title\'))!=\'\' ? true : false;'), array($this)));
        $this->addCheck(new FormValidatorPost($this));
        $this->addCheck(new FormValidatorCSRF($this));
        $this->issue = $issue;
    }

Usage Example

コード例 #1
0
 /**
  * Inizialize the project identifier and call the parent construct method.
  *
  * @param mixed $project_id
  */
 public function __construct($project_id = null, $object = null, $options = array(), $CSRFSecret = null)
 {
     $this->project_id = $project_id;
     parent::__construct($object, $options, $CSRFSecret);
 }