__construct() public method

public __construct ( )
Exemplo n.º 1
0
 public function __construct()
 {
     parent::__construct();
     $this->addCrumb($this->translate('custom_fields'), $this->generateUrl('project_settings_custom_fields'));
     $this->before(['edit', 'save', 'destroy'], function () {
         $this->object = CustomField::find(Request::$properties->get('id'));
         if (!$this->object || $this->object->project_id != $this->currentProject['id']) {
             return $this->show404();
         }
     });
 }
Exemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
     $this->title($this->translate('components'));
     $this->before(['edit', 'save', 'destroy'], function () {
         $this->object = Component::find(Request::$properties->get('id'));
         if (!$this->object || $this->object->project_id != $this->currentProject['id']) {
             return $this->show404();
         }
     });
 }
Exemplo n.º 3
0
 public function __construct()
 {
     parent::__construct();
     $this->title($this->translate('milestones'));
     $this->before(['edit', 'save', 'delete', 'destroy'], function () {
         $this->object = Milestone::find(Request::$properties->get('id'));
         if (!$this->object || $this->object->project_id != $this->currentProject['id']) {
             return $this->show404();
         }
     });
     $this->after('save', function () {
         if ($this->object->isBeingCompleted) {
             Timeline::milestoneCompletedEvent($this->currentUser, $this->object)->save();
         }
     });
 }
Exemplo n.º 4
0
 public function __construct()
 {
     parent::__construct();
     $this->title($this->translate("members"));
 }
Exemplo n.º 5
0
 public function __construct()
 {
     parent::__construct();
     $this->title(l('custom_fields'));
 }
Exemplo n.º 6
0
 public function __construct()
 {
     parent::__construct();
     // Set Form::select() options
     View::set('options', array('defaults' => array(array('label' => l('allow'), 'value' => 1), array('label' => l('deny'), 'value' => 0)), 'all' => array(array('label' => l('defaults'), 'value' => -1), array('label' => l('allow'), 'value' => 1), array('label' => l('deny'), 'value' => 0))));
 }
Exemplo n.º 7
0
 public function __construct()
 {
     parent::__construct();
     $this->addCrumb($this->translate('members'), $this->generateUrl('project_settings_members'));
 }