/** * (non-PHPdoc) * @see EPPager::getFieldNames() */ public function getFieldNames() { $fields = parent::getFieldNames(); return $fields; }
/** * (non-PHPdoc) * @see EPPager::getFieldNames() */ public function getFieldNames() { $fields = parent::getFieldNames(); $fields['_courses_current'] = 'current-courses'; return $fields; }
/** * Constructor. * * @param IContextSource $context * @param array $conds */ public function __construct(IContextSource $context, array $conds = array()) { $this->mDefaultDirection = true; // when MW 1.19 becomes min, we want to pass an IContextSource $context here. parent::__construct($context, $conds, 'EPArticle'); }
/** * (non-PHPdoc) * @see EPPager::getConditions() */ protected function getConditions() { $conds = parent::getConditions(); if (array_key_exists('status', $conds)) { $now = wfGetDB(DB_SLAVE)->addQuotes(wfTimestampNow()); switch ($conds['status']) { case 'passed': $conds[] = 'end < ' . $now; break; case 'planned': $conds[] = 'start > ' . $now; break; case 'current': $conds[] = 'end >= ' . $now; $conds[] = 'start <= ' . $now; break; } unset($conds['status']); } return $conds; }
/** * (non-PHPdoc) * @see EPPager::getMultipleItemActions() */ protected function getMultipleItemActions() { $actions = parent::getMultipleItemActions(); if ($this->getUser()->isAllowed('ep-org')) { $actions[wfMsg('ep-pager-delete-selected')] = array('class' => 'ep-pager-delete-selected', 'data-type' => ApiDeleteEducation::getTypeForClassName($this->className)); } return $actions; }