示例#1
0
 /**
  * Form initialization.
  * 
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     // Job Name
     $name = new Element\Text('name');
     $name->setLabel('Job Name');
     $name->setAttributes(array('autocomplete' => 'off', 'class' => 'form-control'));
     $this->add($name);
     // Command
     $command = new Element\Textarea('command');
     $command->setLabel('Command');
     $command->setAttributes(array('autocomplete' => 'off', 'class' => 'form-control command'));
     $this->add($command);
     // Add fieldset wrapping all time options
     $this->add($this->getTimeFieldset());
     // Add fieldset wrapping all repeat options
     $this->add($this->getRepeatFieldset());
 }
示例#2
0
 /**
  * Form initialization.
  * 
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     // Job Name
     $name = new Element\Text('name');
     $name->setLabel('Job Name');
     $name->setAttributes(array('autocomplete' => 'off', 'class' => 'form-control'));
     $this->add($name);
     // Expression
     $expression = new Element\Text('expression');
     $expression->setLabel('Time');
     $expression->setValue('* * * * *');
     $expression->setAttributes(array('autocomplete' => 'off', 'class' => 'form-control'));
     $this->add($expression);
     // Command
     $command = new Element\Textarea('command');
     $command->setLabel('Command');
     $command->setAttributes(array('autocomplete' => 'off', 'class' => 'form-control command'));
     $this->add($command);
 }