本文整理汇总了PHP中Cabinet::getTag方法的典型用法代码示例。如果您正苦于以下问题:PHP Cabinet::getTag方法的具体用法?PHP Cabinet::getTag怎么用?PHP Cabinet::getTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cabinet
的用法示例。
在下文中一共展示了Cabinet::getTag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getContent
public function getContent()
{
if (empty($this->content)) {
PHPWS_Core::initModClass('filecabinet', 'Cabinet.php');
$this->content = Cabinet::getTag($this->type_id);
}
return $this->content;
}
示例2: show
public function show()
{
PHPWS_Core::initModClass('hms', 'HMS_Residence_Hall.php');
PHPWS_Core::initModClass('hms', 'HMS_Util.php');
PHPWS_Core::initModClass('filecabinet', 'Cabinet.php');
$hall = new HMS_Residence_Hall($this->hallId);
$tpl = array();
$tpl['HALL'] = $hall->hall_name;
if (isset($hall->exterior_image_id)) {
$tpl['EXTERIOR_IMAGE'] = Cabinet::getTag($hall->exterior_image_id);
}
if (isset($hall->room_plan_image_id) && $hall->room_plan_image_id != 0) {
$file = Cabinet::getFile($hall->room_plan_image_id);
$tpl['ROOM_PLAN_IMAGE'] = $file->parentLinked();
}
if (isset($hall->map_image_id)) {
$tpl['MAP_IMAGE'] = Cabinet::getTag($hall->map_image_id);
}
if (isset($hall->other_image_id) && $hall->other_image_id != 0 && $hall->other_image_id != '0') {
$file = Cabinet::getFile($hall->other_image_id);
$tpl['OTHER_IMAGE'] = $file->parentLinked();
}
if ($this->rlcAssignment != null && ($this->rlcAssignment->getStateName() == 'confirmed' || $this->rlcAssignment->getStateName() == 'selfselect-invite')) {
$rlcId = $this->rlcAssignment->getRlc()->getId();
} else {
$rlcId = null;
}
$floors = $hall->get_floors();
foreach ($floors as $floor) {
$row = array();
if ($floor->count_avail_lottery_rooms($this->student->getGender(), $rlcId) <= 0) {
$row['FLOOR'] = HMS_Util::ordinal($floor->floor_number);
$row['ROW_TEXT_COLOR'] = 'class="text-muted"';
$tpl['floor_list'][] = $row;
continue;
}
$floorCmd = CommandFactory::getCommand('LotteryChooseFloor');
$floorCmd->setFloorId($floor->id);
$row['FLOOR'] = $floorCmd->getLink(HMS_Util::ordinal($floor->floor_number) . ' floor');
$row['ROW_TEXT_COLOR'] = 'grey';
$tpl['floor_list'][] = $row;
}
Layout::addPageTitle("Choose Floor");
return PHPWS_Template::process($tpl, 'hms', 'student/lottery_choose_floor.tpl');
}