本文整理汇总了PHP中Presenter::before方法的典型用法代码示例。如果您正苦于以下问题:PHP Presenter::before方法的具体用法?PHP Presenter::before怎么用?PHP Presenter::before使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Presenter
的用法示例。
在下文中一共展示了Presenter::before方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: before
public function before()
{
parent::before();
// Load Slills package
\Package::load('Skills');
$this->skillsPackage = \Skills\Skills::forge();
}
示例2: before
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;
}
示例3: before
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;
}
}
示例4: before
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]);
}
}
示例5: before
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 =
*
*/
}
示例6: before
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]);
}
}
}
}