本文整理汇总了PHP中Term::rawToRead方法的典型用法代码示例。如果您正苦于以下问题:PHP Term::rawToRead方法的具体用法?PHP Term::rawToRead怎么用?PHP Term::rawToRead使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Term
的用法示例。
在下文中一共展示了Term::rawToRead方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: getCSV
public function getCSV()
{
return array('Term' => Term::rawToRead($this->term, false));
}
示例3: generatePdf
/**
* Does the hard work of generating a PDF.
*/
private function generatePdf()
{
$this->pdf = new FPDI('P', 'mm', 'Letter');
$a = $this->internship->getAgency();
$d = $this->internship->getDepartment();
$f = $this->internship->getFaculty();
$m = $this->internship->getUgradMajor();
$g = $this->internship->getGradProgram();
$subject = $this->internship->getSubject();
$pagecount = $this->pdf->setSourceFile(PHPWS_SOURCE_DIR . 'mod/intern/pdf/ASU_Internship_Contract_101711_v7c-5-28-14.pdf');
$tplidx = $this->pdf->importPage(1);
$this->pdf->addPage();
$this->pdf->useTemplate($tplidx);
$this->pdf->setFont('Times', null, 10);
/**************************
* Internship information *
*/
// Term
$this->pdf->setXY(128, 39);
$this->pdf->cell(60, 5, Term::rawToRead($this->internship->getTerm(), false));
/* Department */
//$this->pdf->setFont('Times', null, 10);
$this->pdf->setXY(171, 40);
$this->pdf->MultiCell(31, 3, $subject->getAbbreviation());
// Subject and Course #
//$this->pdf->setFont('Times', null, 8);
$this->pdf->setXY(132, 49);
$course_info = $this->internship->getCourseNumber();
$this->pdf->cell(59, 5, $course_info);
// Section #
$this->pdf->setXY(178, 49);
$this->pdf->cell(25, 5, $this->internship->getCourseSection());
/*
$this->pdf->setXY(132, 39);
if (!is_null($m)) {
$major = $m->getName();
} else {
$major = 'N/A';
}
$this->pdf->cell(73, 5, $major);
*/
//$this->pdf->setFont('Times', null, 10);
$this->pdf->setXY(140, 53);
$this->pdf->cell(73, 6, $this->internship->getCourseTitle());
/* Location */
if ($this->internship->isDomestic()) {
$this->pdf->setXY(85, 64);
$this->pdf->cell(12, 5, 'X');
}
if ($this->internship->isInternational()) {
$this->pdf->setXY(156, 64);
$this->pdf->cell(12, 5, 'X');
}
/**
* Student information.
*/
$this->pdf->setXY(40, 81);
$this->pdf->cell(55, 5, $this->internship->getFullName());
$this->pdf->setXY(173, 81);
$this->pdf->cell(54, 5, $this->internship->getGpa());
$this->pdf->setXY(32, 87);
$this->pdf->cell(42, 5, $this->internship->getBannerId());
$this->pdf->setXY(41, 92);
$this->pdf->cell(54, 5, $this->internship->getEmailAddress() . '@appstate.edu');
$this->pdf->setXY(113, 92);
$this->pdf->cell(54, 5, $this->internship->getPhoneNumber());
/* Student Address */
$this->pdf->setXY(105, 87);
$this->pdf->cell(54, 5, $this->internship->getStudentAddress());
/* Payment */
if ($this->internship->isPaid()) {
$this->pdf->setXY(160, 92);
$this->pdf->cell(10, 5, 'X');
}
if ($this->internship->isUnPaid()) {
$this->pdf->setXY(190, 92);
$this->pdf->cell(10, 5, 'X');
}
/* Start/end dates */
//$this->pdf->setFont('Times', null, 10);
$this->pdf->setXY(50, 97);
$this->pdf->cell(25, 5, $this->internship->getStartDate(true));
$this->pdf->setXY(93, 97);
$this->pdf->cell(25, 5, $this->internship->getEndDate(true));
/* Hours */
$this->pdf->setXY(193, 97);
$this->pdf->cell(12, 5, $this->internship->getCreditHours());
$this->pdf->setXY(157, 97);
$this->pdf->cell(12, 5, $this->internship->getAvgHoursPerWeek());
// hours per week
// $this->pdf->cell(35, 5, 'Graduate Program:', 'LTB');
// if (!is_null($g)) {
// $this->pdf->cell(155, 5, $g->getName(), 'RTB');
// } else {
// $this->pdf->cell(155, 5, 'N/A', 'RTB');
// }
//
//.........这里部分代码省略.........
示例4: sendRegistrationIssueEmail
/**
* Sends the 'Registration Issue' notification email.
*
* @param Internship $i
* @param Agency $agency
* @param string $note
*/
public static function sendRegistrationIssueEmail(Internship $i, Agency $agency, $note)
{
$tpl = array();
$subjects = Subject::getSubjects();
$settings = InternSettings::getInstance();
$faculty = $i->getFaculty();
$tpl = array();
$tpl['NAME'] = $i->getFullName();
$tpl['BANNER'] = $i->banner;
$tpl['USER'] = $i->email;
$tpl['PHONE'] = $i->phone;
$tpl['TERM'] = Term::rawToRead($i->term, false);
if (isset($i->course_subj)) {
$tpl['SUBJECT'] = $subjects[$i->course_subj];
} else {
$tpl['SUBJECT'] = '(No course subject provided)';
}
$tpl['COURSE_NUM'] = $i->course_no;
if (isset($i->course_sect)) {
$tpl['SECTION'] = $i->course_sect;
} else {
$tpl['SECTION'] = '(not provided)';
}
if (isset($i->course_title)) {
$tpl['COURSE_TITLE'] = $i->course_title;
}
if (isset($i->credits)) {
$tpl['CREDITS'] = $i->credits;
} else {
$tpl['CREDITS'] = '(not provided)';
}
$startDate = $i->getStartDate(true);
if (isset($startDate)) {
$tpl['START_DATE'] = $startDate;
} else {
$tpl['START_DATE'] = '(not provided)';
}
$endDate = $i->getEndDate(true);
if (isset($endDate)) {
$tpl['END_DATE'] = $endDate;
} else {
$tpl['END_DATE'] = '(not provided)';
}
if ($faculty instanceof Faculty) {
$tpl['FACULTY'] = $faculty->getFullName();
} else {
$tpl['FACULTY'] = '(not provided)';
}
$department = $i->getDepartment();
$tpl['DEPT'] = $department->getName();
if ($i->international) {
$tpl['COUNTRY'] = $i->loc_country;
$tpl['INTERNATIONAL'] = 'Yes';
$intlSubject = '[int\'l] ';
} else {
$tpl['STATE'] = $i->loc_state;
$tpl['INTERNATIONAL'] = 'No';
$intlSubject = '';
}
$tpl['NOTE'] = $note;
$to = $i->email . $settings->getEmailDomain();
if ($faculty instanceof Faculty) {
$cc = array($faculty->getUsername() . $settings->getEmailDomain());
} else {
$cc = array();
}
$subject = 'Internship Enrollment Issue';
email::sendTemplateMessage($to, $subject, 'email/RegistrationIssue.tpl', $tpl, $cc);
}
示例5: getRowTags
/**
* Row tags for DBPager
*/
public function getRowTags()
{
PHPWS_Core::initModClass('intern', 'Term.php');
$tags = array();
// Get objects associated with this internship.
$a = $this->getAgency();
$d = $this->getDepartment();
// Student info.
$tags['STUDENT_NAME'] = PHPWS_Text::moduleLink($this->getFullName(), 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
$tags['STUDENT_BANNER'] = PHPWS_Text::moduleLink($this->getBannerId(), 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
// Dept. info
$tags['DEPT_NAME'] = PHPWS_Text::moduleLink($d->name, 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
// Faculty info.
if (isset($this->faculty_id)) {
$f = $this->getFaculty();
$facultyName = $f->getFullName();
$tags['FACULTY_NAME'] = PHPWS_Text::moduleLink($f->getFullName(), 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
} else {
// Makes this cell in the table a clickable link, even if there's no faculty name
$tags['FACULTY_NAME'] = PHPWS_Text::moduleLink(' ', 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
}
$tags['TERM'] = PHPWS_Text::moduleLink(Term::rawToRead($this->term), 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
$tags['WORKFLOW_STATE'] = PHPWS_Text::moduleLink($this->getWorkflowState()->getFriendlyName(), 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
//$tags['EDIT'] = PHPWS_Text::moduleLink('Edit', 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
//$tags['PDF'] = PHPWS_Text::moduleLink('Generate Contract', 'intern', array('action' => 'pdf', 'id' => $this->id));
return $tags;
}