本文整理汇总了PHP中FrontendTemplate::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP FrontendTemplate::getName方法的具体用法?PHP FrontendTemplate::getName怎么用?PHP FrontendTemplate::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrontendTemplate
的用法示例。
在下文中一共展示了FrontendTemplate::getName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parseCredit
protected function parseCredit($objItem)
{
global $objPage;
$objCredit = new FileCreditHybridModel();
$objCredit = $objCredit->findRelatedByCredit($objItem, $this->arrPids);
if (is_null($objCredit)) {
return null;
}
$objTemplate = new \FrontendTemplate('filecredit_default');
$objTemplate->setData($objCredit->file->row());
// TODO
$objTemplate->link = $this->generateCreditUrl($objCredit);
$objTemplate->linkText = $GLOBALS['TL_LANG']['MSC']['creditLinkText'];
// TODO
if ($objCredit->page === null && $objCredit->result->usage) {
$objTemplate->pageTitle = $objCredit->result->usage;
} else {
$objTemplate->pageTitle = $objCredit->page->pageTitle ? $objCredit->page->pageTitle : $objCredit->page->title;
}
// colorbox support
if ($objPage->outputFormat == 'xhtml') {
$strLightboxId = 'lightbox';
} else {
$strLightboxId = 'lightbox[' . substr(md5($objTemplate->getName() . '_' . $objCredit->file->id), 0, 6) . ']';
}
$objTemplate->attribute = $strLightboxId ? ($objPage->outputFormat == 'html5' ? ' data-gallery="#gallery-' . $this->id . '" data-lightbox="' : ' rel="') . $strLightboxId . '"' : '';
return $objTemplate->parse();
}
示例2: createBlockWrapper
public static function createBlockWrapper($objBlock, $strContent)
{
$objT = new \FrontendTemplate($objBlock->customTpl ? $objBlock->customTpl : 'blocks_wrapper');
$objT->block = $strContent;
$arrCssID = deserialize($objBlock->featureActive ? $objBlock->feature_cssID : $objBlock->cssID, true);
$arrSpace = deserialize($objBlock->space);
$arrStyle = array();
if ($arrSpace[0] != '') {
$arrStyle[] = 'margin-top:' . $arrSpace[0] . 'px;';
}
if ($arrSpace[1] != '') {
$arrStyle[] = 'margin-bottom:' . $arrSpace[1] . 'px;';
}
$objT->style = !empty($arrStyle) ? implode(' ', $arrStyle) : '';
$objT->class = trim($objT->getName() . ' ' . $arrCssID[1]);
$objT->cssID = $arrCssID[0] != '' ? ' id="' . $arrCssID[0] . '"' : '';
$objT->blockTpl = $objBlock->customBlockTpl ? $objBlock->customBlockTpl : 'block_searchable';
$arrHeadline = deserialize($objBlock->headline);
$objT->headline = is_array($arrHeadline) ? $arrHeadline['value'] : $arrHeadline;
$objT->hl = is_array($arrHeadline) ? $arrHeadline['unit'] : 'h1';
return $objT->parse();
}