Beispiel #1
0
 public function before()
 {
     parent::before();
     // Load Slills package
     \Package::load('Skills');
     $this->skillsPackage = \Skills\Skills::forge();
 }
Beispiel #2
0
 public function before()
 {
     parent::before();
     if ($this->id == 'null') {
         $this->id = '_new';
     }
     $this->requested_person = Model_Person::find($this->id);
     $this->requested_person === null ? $this->requested_person = Model_Person::forge() : null;
 }
Beispiel #3
0
 public function before()
 {
     parent::before();
     // Load list of aircraft here
     $this->aircraft_models = Model_Aircraft::find('all');
     $this->aircraft_options = ['_new' => 'Create new aircraft'];
     foreach ($this->aircraft_models as $aircraft_model) {
         $this->aircraft_options[$aircraft_model->id] = $aircraft_model->name;
     }
 }
Beispiel #4
0
 public function before()
 {
     parent::before();
     $this->requested_flight_record = Model_Flight_Record::find($this->id, ['related' => ['manifests' => ['related' => ['aircraft', 'aerodromes']]]]);
     $this->requested_flight_record === null ? $this->requested_flight_record = Model_Flight_Record::forge() : null;
     // Pull out manifest details
     foreach ($this->requested_flight_record->manifests as $manifest) {
         $left_text = '';
         // AA-CH #10009 for example
         $cells = [View::forge('widgets/tablewithactions/row/cell', ['cell_content' => $left_text], false)];
         $this->manifests_table_rows[] = View::forge('widgets/tablewithactions/row', ['cells' => $cells, 'id' => $manifest->id, 'duplicate_action' => false]);
     }
 }
 public function before()
 {
     parent::before();
     if ($this->user) {
         $this->userOptions = View::forge('header/dropdown')->set('user', $this->user);
     } else {
         $this->userOptions = View::forge('header/login_or_register');
     }
     //TODO $activeLink
     /*
      * $activeLink =
      *
      */
 }
Beispiel #6
0
 public function before()
 {
     parent::before();
     $this->requested_aircraft = Model_Aircraft::find($this->id, ['related' => ['aircraft_arms']]);
     $this->requested_aircraft === null ? $this->requested_aircraft = Model_Aircraft::forge() : null;
     // Pull out cg limits
     foreach ($this->requested_aircraft->aircraft_arms as $aircraft_arm) {
         if ($aircraft_arm->type === 'maxweight') {
             $cells = [View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_position', $aircraft_arm->position, ['class' => 'form-control', 'disabled'])], false), View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_value', $aircraft_arm->value, ['class' => 'form-control', 'disabled']) . Form::hidden('_type', 'maxweight') . Form::hidden('_name', 'limit')], false)];
             $this->cglimits_table_rows[] = View::forge('widgets/tablewithactions/row', ['cells' => $cells, 'id' => $aircraft_arm->id, 'duplicate_action' => false]);
         } else {
             if ($aircraft_arm->type === 'arm') {
                 $cells = [View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_name', $aircraft_arm->name, ['class' => 'form-control', 'disabled'])], false), View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_position', $aircraft_arm->position, ['class' => 'form-control', 'disabled'])], false), View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_value', $aircraft_arm->value, ['class' => 'form-control', 'disabled']) . Form::hidden('_type', 'arm')], false)];
                 $this->arms_table_rows[] = View::forge('widgets/tablewithactions/row', ['cells' => $cells, 'id' => $aircraft_arm->id, 'duplicate_action' => false]);
             }
         }
     }
 }