本文整理汇总了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