当前位置: 首页>>代码示例>>PHP>>正文


PHP Staff::loggedInId方法代码示例

本文整理汇总了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']);
 }
开发者ID:nidhhoggr,项目名称:supra,代码行数:8,代码来源:TaskCommentForm.class.php

示例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);
 }
开发者ID:nidhhoggr,项目名称:supra,代码行数:8,代码来源:TimeLogTable.class.php

示例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());
     }
 }
开发者ID:nidhhoggr,项目名称:supra,代码行数:13,代码来源:TimeQueryForm.class.php

示例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')));
 }
开发者ID:nidhhoggr,项目名称:supra,代码行数:14,代码来源:TimeLogForm.class.php

示例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')));
 }
开发者ID:nidhhoggr,项目名称:supra,代码行数:18,代码来源:TaskLogForm.class.php

示例6: getByStaffId

 public function getByStaffId()
 {
     return Doctrine_Query::Create()->from('TaskComment tc')->where('tc.staff_id = ?', Staff::loggedInId())->execute();
 }
开发者ID:nidhhoggr,项目名称:supra,代码行数:4,代码来源:TaskCommentTable.class.php


注:本文中的Staff::loggedInId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。