public function getAllTypes() { static $types; if (!isset($types)) { $crud = CRUD::read('exam_types'); $list = $crud->getAll(); $types = array(); foreach ($list as $type) { $types[$type['id']] = $type->getAllData(); } } return $types; }
public function getAll() { $crud = CRUD::read('specials'); return $crud->getAll(); }
public function getAll() { $crud = CRUD::read('subjects'); return $crud->getAll(); }
public function getAllSubSubjects($extend = true) { if (!isset($this->sub_subjects)) { if ($extend) { $subjects = $this->getAllSubjects(); } $crud = CRUD::read('sub_subjects'); $list = $crud->getAll(); $this->sub_subjects = array(); foreach ($list as $id => $sub_subject) { $sub = $sub_subject->getAllData(); if ($extend) { $sub['subject'] = $subjects[$sub['subject_id']]; } $this->sub_subjects[$sub['id']] = $sub; } } return $this->sub_subjects; }