本文整理匯總了PHP中Program::getAllProgramAreas方法的典型用法代碼示例。如果您正苦於以下問題:PHP Program::getAllProgramAreas方法的具體用法?PHP Program::getAllProgramAreas怎麽用?PHP Program::getAllProgramAreas使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Program
的用法示例。
在下文中一共展示了Program::getAllProgramAreas方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: updateProgramArea
public function updateProgramArea($programId)
{
$program = new Program();
$areas = $program->getAllProgramAreas();
$programArea = $program->getProgramAreaByProgramId($programId);
$programData = $program->getProgramById($programId);
$data = array('areas' => $areas, 'currentArea' => $programArea, 'programData' => $programData);
loadTemplateSafelyByGroup($this->COORDINATOR_GROUP, "coordinator/edit_program_area", $data);
}
示例2: form_open
<?php
require_once APPPATH . 'controllers/program.php';
$programName = array("name" => "program_name", "id" => "program_name", "type" => "text", "class" => "form-campo", "class" => "form-control", "maxlength" => "40");
$programAcronym = array("name" => "program_acronym", "id" => "program_acronym", "type" => "text", "class" => "form-campo", "class" => "form-control", "maxlength" => "6");
$submitBtn = array("id" => "sregister_new_program", "class" => "btn bg-olive btn-block", "content" => "Cadastrar programa", "type" => "submit");
$program = new Program();
$programArea = $program->getAllProgramAreas();
if ($programArea === FALSE) {
$programArea = array("Nenhuma área cadastrada.");
}
$openingYear = array();
$currentYear = getCurrentYear();
if ($currentYear !== FALSE) {
for ($i = 1990; $i <= $currentYear + 2; $i++) {
$openingYear[$i] = $i;
}
} else {
$openingYear[] = "Ocorreu um erro ao ler o ano do banco de dados";
$submitBtn['disabled'] = TRUE;
}
?>
<div class="form-box" id="login-box">
<div class="header">Cadastrar um novo Programa</div>
<?php
echo form_open("program/newProgram");
?>
<div class="body bg-gray">
<div class="form-group">
<?php