本文整理汇总了PHP中Staff::loggedInId方法的典型用法代码示例。如果您正苦于以下问题:PHP Staff::loggedInId方法的具体用法?PHP Staff::loggedInId怎么用?PHP Staff::loggedInId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Staff
的用法示例。
在下文中一共展示了Staff::loggedInId方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configure
public function configure()
{
$params = $this->getOption('params');
$this->unsetTimeStampable();
$this->setWidget('staff_id', new sfWidgetFormInputHidden());
$this->setDefault('staff_id', Staff::loggedInId());
$this->setDefault('task_id', $params['task_id']);
}
示例2: getValidTimeLogTypes
public function getValidTimeLogTypes()
{
$staff_id = Staff::loggedInId();
$table = Doctrine_Core::getTable('TimeLogType');
$tlt = $this->getLastTimeLogTypeByStaffId($staff_id);
$ci = $table->getClockInById($tlt);
return $table->getByClockIn($ci);
}
示例3: configure
public function configure()
{
$params = $this->getOption('params');
$fromOptions = array('widget_name' => 'from', 'params' => $params, 'default_date' => '2008-01-01', 'default_time' => '12:00 AM');
$untilOptions = array('widget_name' => 'until', 'params' => $params, 'default_date' => date('Y-m-d'), 'default_time' => date('h:i A'));
$this->setWidgets(array('staff_id' => new sfWidgetFormDoctrineChoice(array('label' => 'Employee', 'model' => 'Staff', 'add_empty' => false)), 'from' => new sfJQueryDateTimeWidget($fromOptions), 'until' => new sfJQueryDateTimeWidget($untilOptions)));
$this->setValidators(array('from' => new sfJQueryDateTimeValidator(array('widget_name' => 'from')), 'until' => new sfJQueryDateTimeValidator(array('widget_name' => 'until'))));
if (@$params['staff_id']) {
$this->setDefault('staff_id', $params['staff_id']);
} else {
$this->setDefault('staff_id', Staff::loggedInId());
}
}
示例4: configure
public function configure()
{
$this->unsetTimeStampable();
$this->setDefault('staff_id', Staff::loggedInId());
if (!$this->getCurrentUser()->isSuperAdmin()) {
$staff_input = new sfWidgetFormInputHidden();
$this->setWidget('staff_id', $staff_input);
}
$params = $this->getOption('params');
$options = array('widget_name' => 'time', 'params' => $params, 'default_date' => date('Y-m-d'), 'default_time' => date('h:i A'));
$this->setWidget('time_log_type_id', new sfWidgetFormDoctrineChoice(array('model' => 'TimeLog', 'table_method' => 'getValidTimeLogTypes'), array()));
$this->setWidget('time', new sfJQueryDateTimeWidget($options));
$this->setValidator('time', new sfJQueryDateTimeValidator(array('widget_name' => 'time')));
}
示例5: configure
public function configure()
{
$params = $this->getOption('params');
$this->unsetTimeStampable();
$this->setWidget('staff_id', new sfWidgetFormInputHidden());
$this->setDefault('staff_id', Staff::loggedInId());
$this->setDefault('task_id', $params['task_id']);
if (!$this->getCurrentUser()->isSuperAdmin()) {
unset($this['is_viewable'], $this['percentage']);
}
$this->getOption('params');
$inOptions = array('widget_name' => 'clock_in', 'params' => $params, 'default_date' => date('Y-m-d'), 'default_time' => date('h:i A'));
$outOptions = array('widget_name' => 'clock_out', 'params' => $params, 'default_date' => date('Y-m-d'), 'default_time' => date('h:i A'));
$this->setWidget('clock_in', new sfJQueryDateTimeWidget($inOptions));
$this->setWidget('clock_out', new sfJQueryDateTimeWidget($outOptions));
$this->setValidator('clock_in', new sfJQueryDateTimeValidator(array('widget_name' => 'clock_in')));
$this->setValidator('clock_out', new sfJqueryDateTimeValidator(array('widget_name' => 'clock_out')));
}
示例6: getByStaffId
public function getByStaffId()
{
return Doctrine_Query::Create()->from('TaskComment tc')->where('tc.staff_id = ?', Staff::loggedInId())->execute();
}