當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Program::getAllPrograms方法代碼示例

本文整理匯總了PHP中Program::getAllPrograms方法的典型用法代碼示例。如果您正苦於以下問題:PHP Program::getAllPrograms方法的具體用法?PHP Program::getAllPrograms怎麽用?PHP Program::getAllPrograms使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Program的用法示例。


在下文中一共展示了Program::getAllPrograms方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: formToEditCourse

 /**
  * Function to load the page of a course that will be updated
  * @param int $id
  */
 public function formToEditCourse($courseId)
 {
     $this->load->model('course_model');
     $course = $this->course_model->getCourseById($courseId);
     $user = new Usuario();
     $userToBeSecretaries = $user->getUsersToBeSecretaries();
     if ($userToBeSecretaries !== FALSE) {
         foreach ($userToBeSecretaries as $user) {
             $formUserSecretary[$user['id']] = $user['name'];
         }
     } else {
         $formUserSecretary = FALSE;
     }
     $course_controller = new Course();
     $secretaryRegistered = $course_controller->getCourseSecrecretary($course['id_course']);
     $course_types = $this->db->get('course_type')->result_array();
     foreach ($course_types as $ct) {
         $formCourseType[$ct['id']] = $ct['description'];
     }
     $originalCourseType = $this->course_model->getCourseTypeByCourseId($courseId);
     $originalCourseTypeId = $originalCourseType['id'];
     $program = new Program();
     $registeredPrograms = $program->getAllPrograms();
     if ($registeredPrograms !== FALSE) {
         foreach ($registeredPrograms as $currentProgram) {
             $registeredProgramsForm[$currentProgram['id_program']] = $currentProgram['program_name'];
         }
     }
     $data = array('course' => $course, 'formUserSecretary' => $formUserSecretary, 'secretary_registered' => $secretaryRegistered, 'form_course_types' => $formCourseType, 'original_course_type' => $originalCourseTypeId, 'registeredPrograms' => $registeredProgramsForm);
     loadTemplateSafelyByPermission("cursos", 'course/update_course', $data);
 }
開發者ID:kailIII,項目名稱:SiGA,代碼行數:35,代碼來源:course.php

示例2: allList

	public function allList($request, $response)
	{/*{{{*/
		$response->programs = Program::getAllPrograms();
	}/*}}}*/
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:4,代碼來源:programcontroller.php


注:本文中的Program::getAllPrograms方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。