示例#1
0
 /**
  * Renders the form for editing.
  *
  * @param Horde_Form_Renderer $renderer  A renderer instance, optional
  *                                       since Horde 3.2.
  * @param Variables $vars                A Variables instance, optional
  *                                       since Horde 3.2.
  * @param string $action                 The form action (url).
  * @param string $method                 The form method, usually either
  *                                       'get' or 'post'.
  * @param string $enctype                The form encoding type. Determined
  *                                       automatically if null.
  * @param boolean $focus                 Focus the first form field?
  */
 public function renderActive($renderer, $vars, $action, $method = 'get', $enctype = null, $focus = true)
 {
     if ($vars->get('old_datatype') === null) {
         $this->_addParameters($vars);
     }
     parent::renderActive($renderer, $vars, $action, $method, $enctype, $focus);
 }
示例#2
0
 /**
  * Returns whether this variable if it had the "trackchange" option set
  * has actually been changed.
  *
  * @param Variables $vars  The {@link Variables} instance of the submitted
  *                         form.
  *
  * @return boolean  Null if this variable doesn't have the "trackchange"
  *                  option set or the form wasn't submitted yet. A boolean
  *                  indicating whether the variable was changed otherwise.
  */
 function wasChanged($vars)
 {
     if (!$this->getOption('trackchange')) {
         return null;
     }
     $old = $vars->get('__old_' . $this->getVarName());
     if (is_null($old)) {
         return null;
     }
     return $old != $vars->get($this->getVarName());
 }
示例#3
0
文件: Task.php 项目: netresearch/kite
 /**
  * Task constructor.
  *
  * @param Variables $parent Parent object (Task/Job/Workflow)
  */
 public function __construct(Variables $parent)
 {
     $this->job = $parent instanceof Job ? $parent : $parent->get('job');
     $this->console = $this->job->console;
     parent::__construct($parent);
 }