예제 #1
0
 /**
  * (non-PHPdoc)
  * @see EPPager::getFilterOptions()
  */
 protected function getFilterOptions()
 {
     $options = array();
     if (!array_key_exists('course_id', $this->conds)) {
         $options['course_id'] = array('type' => 'select', 'options' => array_merge(array('' => ''), EPCourse::getCourseOptions(EPCourse::select(array('name', 'id')))), 'value' => '', 'datatype' => 'int');
         $options['org_id'] = array('type' => 'select', 'options' => array_merge(array('' => ''), EPOrg::getOrgOptions(EPOrg::select(array('name', 'id')))), 'value' => '', 'datatype' => 'int');
     }
     $years = EPTerm::selectFields('year', array(), array('DISTINCT'), array(), true);
     asort($years, SORT_NUMERIC);
     $years = array_merge(array(''), $years);
     $years = array_combine($years, $years);
     $options['year'] = array('type' => 'select', 'options' => $years, 'value' => '');
     $options['status'] = array('type' => 'select', 'options' => array_merge(array('' => ''), EPTerm::getStatuses()), 'value' => 'current');
     return $options;
 }