本文整理汇总了PHP中Term::getFutureTermsAssoc方法的典型用法代码示例。如果您正苦于以下问题:PHP Term::getFutureTermsAssoc方法的具体用法?PHP Term::getFutureTermsAssoc怎么用?PHP Term::getFutureTermsAssoc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Term
的用法示例。
在下文中一共展示了Term::getFutureTermsAssoc方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: plugInternship
/**
* Loads the form's fields with the internship's information.
* TODO: Use getter methods instead of just accessing Internship member variables directly.
*/
public function plugInternship()
{
$this->plugStudent();
$this->plugDept();
$this->plugFaculty();
$this->plugAgency();
$this->plugInternInfo();
$this->plugCourseInfo();
// We're editing an internship...
// If this internship's term is in the past, then replace the term list with just that term
if (!in_array($this->intern->term, array_keys(Term::getFutureTermsAssoc()))) {
// Remove the term dropdown and repalce it
$this->form->dropElement('term');
$this->form->addSelect('term', array($this->intern->term => Term::rawToRead($this->intern->term)));
$this->form->setLabel('term', 'Select Term');
$this->form->addCssClass('term', 'form-control');
}
$this->form->setMatch('term', $this->intern->term);
$this->form->setMatch('experience_type', $this->intern->getExperienceType());
// Plug
$this->form->plugIn($this->formVals);
/**
* *
* Emergency Contacts
*/
//javascript('jquery');
PHPWS_Core::initModClass('intern', 'EmergencyContactFactory.php');
$contacts = EmergencyContactFactory::getContactsForInternship($this->intern);
$emgContactJson = json_encode($contacts);
Layout::add(javascriptMod('intern', 'emergencyContact', array('existing_contacts_json' => $emgContactJson)));
}
示例2: buildInternshipForm
//.........这里部分代码省略.........
/**********************
* Internship details *
*/
/***********************
* Internship location *
*/
$loc = array('domestic' => 'Domestic', 'internat' => 'International');
$this->form->addRadioAssoc('location', $loc);
//$this->form->setMatch('location', 'domestic'); // Default to domestic
//$this->form->setRequired('location');
// Domestic fields
$this->form->addText('loc_address');
$this->form->setLabel('loc_address', 'Address');
$this->form->addCssClass('loc_address', 'form-control');
$this->form->addText('loc_city');
$this->form->setLabel('loc_city', 'City');
$this->form->addCssClass('loc_city', 'form-control');
$this->form->addSelect('loc_state', State::getAllowedStates());
$this->form->setLabel('loc_state', 'State');
$this->form->addCssClass('loc_state', 'form-control');
$this->form->addText('loc_zip');
$this->form->setLabel('loc_zip', 'Zip');
$this->form->addCssClass('loc_zip', 'form-control');
// Itn'l location fields
$this->form->addText('loc_province');
$this->form->setLabel('loc_province', 'Province/Territory');
$this->form->addCssClass('loc_province', 'form-control');
$this->form->addText('loc_country');
$this->form->setLabel('loc_country', 'Country');
$this->form->addCssClass('loc_country', 'form-control');
/*************
* Term Info *
*/
$terms = Term::getFutureTermsAssoc();
$terms[-1] = 'Select Term';
$this->form->addSelect('term', $terms);
$this->form->setLabel('term', 'Select Term');
$this->form->addCssClass('term', 'form-control');
$this->form->addText('start_date');
$this->form->setLabel('start_date', 'Start Date');
$this->form->addCssClass('start_date', 'form-control');
$this->form->addText('end_date');
$this->form->setLabel('end_date', 'End Date');
$this->form->addCssClass('end_date', 'form-control');
$this->form->addText('credits');
$this->form->setLabel('credits', 'Credit Hours');
$this->form->addCssClass('credits', 'form-control');
$this->form->addText('avg_hours_week');
$this->form->setLabel('avg_hours_week', 'Average Hours per Week');
$this->form->addCssClass('avg_hours_week', 'form-control');
$this->form->addCheck('multipart');
$this->form->setLabel('multipart', 'This internship is part of a multi-part experience.');
$this->form->addCheck('secondary_part');
$this->form->setLabel('secondary_part', 'This is a secondary part (enrollment complete through primary part).');
/***************
* Course Info *
*/
$subjects = Subject::getSubjects();
$this->form->addSelect('course_subj', $subjects);
$this->form->setLabel('course_subj', 'Subject');
$this->form->addCssClass('course_subj', 'form-control');
$this->form->addText('course_no');
$this->form->setLabel('course_no', 'Number');
$this->form->addCssClass('course_no', 'form-control');
$this->form->addText('course_sect');
$this->form->setLabel('course_sect', 'Section');