本文整理汇总了PHP中FrontendTemplate类的典型用法代码示例。如果您正苦于以下问题:PHP FrontendTemplate类的具体用法?PHP FrontendTemplate怎么用?PHP FrontendTemplate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FrontendTemplate类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: generateComments
/**
* Generate the comments and return them as HTML string
* @param string
* @param mixed
* @return string
*/
public static function generateComments($strShortname, $varIdentifier = null)
{
$objTemplate = new \FrontendTemplate('disqus');
$objTemplate->shortname = $strShortname;
$objTemplate->identifier = $varIdentifier;
return $objTemplate->parse();
}
开发者ID:codefog,项目名称:contao-disqus,代码行数:13,代码来源:Disqus.php
示例2: inject
public function inject($strBuffer, $strTemplate)
{
// check for appId and version in config
if (!$GLOBALS['TL_CONFIG']['fb_app_id'] || !$GLOBALS['TL_CONFIG']['fb_app_version']) {
return $strBuffer;
}
// check for frontend or backend template
if (stripos($strTemplate, 'fe_') === false && stripos($strTemplate, 'be_main') === false) {
return $strBuffer;
}
// check for <body
if (stripos($strBuffer, '<body') === false) {
return $strBuffer;
}
// determine language string
$lang = $GLOBALS['TL_LANGUAGE'];
if (strlen($lang) == 2) {
$lang = strtolower($lang) . '_' . strtoupper($lang);
} else {
$lang = str_replace('-', '_', $lang);
}
// create the template
$objTemplate = new \FrontendTemplate('facebook-js-sdk');
// set data
$objTemplate->appId = $GLOBALS['TL_CONFIG']['fb_app_id'];
$objTemplate->version = $GLOBALS['TL_CONFIG']['fb_app_version'];
$objTemplate->lang = $lang;
// search for body and inject template
$strBuffer = preg_replace("/(<body.*>)/", "\$1" . $objTemplate->parse(), $strBuffer);
// return the buffer
return $strBuffer;
}
开发者ID:fritzmg,项目名称:contao-facebook-js-sdk,代码行数:32,代码来源:FacebookJSSDK.php
示例3: generateAddActions
public function generateAddActions($arrData, $id, Watchlist $objWatchlist)
{
global $objPage;
if ($objPage === null) {
return;
}
if (\Validator::isUuid($id)) {
$objFile = \FilesModel::findByUuid($id);
} else {
$objFile = \FilesModel::findBy('path', $id);
}
$objItem = new WatchlistItemModel();
$objItem->pid = Watchlist::getInstance()->getId();
$objItem->uuid = $objFile->uuid;
$objItem->pageID = $objPage->id;
$objItem->cid = $arrData['id'];
$objItem->type = $arrData['type'];
$objT = new \FrontendTemplate('watchlist_add_actions');
$objT->addHref = ampersand(\Controller::generateFrontendUrl($objPage->row()) . '?act=' . WATCHLIST_ACT_ADD . '&cid=' . $objItem->cid . '&type=' . $objItem->type . '&id=' . $strUuid . '&title=' . urlencode($objItem->getTitle()));
$objT->addTitle = $GLOBALS['TL_LANG']['WATCHLIST']['addTitle'];
$objT->addLink = $GLOBALS['TL_LANG']['WATCHLIST']['addLink'];
$objT->active = $objWatchlist->isInList($strUuid);
$objT->id = $strUuid;
return $objT->parse();
}
开发者ID:heimrichhannot,项目名称:contao-watchlist,代码行数:25,代码来源:WatchlistItemEnclosure.php
示例4: generateFilterBox
protected function generateFilterBox($filter)
{
$arrLinks = array();
$baseurl = $this->generateFrontendUrl($this->arrJump);
$objT = new \FrontendTemplate('mod_filterlink_set');
$objT->title = $GLOBALS['TL_LANG']['articlefilter']['selectedFilter'];
$objT->baseurl = $baseurl;
$objT->removeAll = $GLOBALS['TL_LANG']['articlefilter']['removeAll'];
if (!is_array($filter) || count($filter) == 0) {
return '';
}
foreach ($filter as $grp => $f) {
foreach ($f as $id) {
$arrAdd[] = sprintf('articlefilter_filter[%s][]=%s', $grp, $id);
$lbl[] = $this->getFilterTitle($id);
}
}
for ($x = 0; $x < count($arrAdd); $x++) {
$add = $arrAdd;
unset($add[$x]);
$arrLinks[] = ['href' => sprintf('%s?%s', $baseurl, implode('&', $add)), 'title' => $lbl[$x]];
}
$objT->links = $arrLinks;
return $objT->parse();
}
开发者ID:kozi,项目名称:contao-articlefilter,代码行数:25,代码来源:ModuleFilterLinks.php
示例5: compile
protected function compile()
{
$GLOBALS['TL_JAVASCRIPT']['articlefilter'] = 'system/modules/articlefilter/assets/articlefilter.js';
$arrGroups = deserialize($this->articlefilter_groups);
$arrSelected = \Input::get('articlefilter_filter');
$res = $this->Database->prepare('SELECT * from tl_articlefilter_groups where id IN (' . implode(',', $arrGroups) . ') AND published = 1 ORDER BY FIELD(id, ' . implode(',', $arrGroups) . ')')->execute();
if ($res->numRows > 0) {
$arrBoxes = [];
$this->Template->hasGroups = true;
$id = 0;
while ($res->next()) {
$arrCriteria = $this->loadCriteriaByGroup($res->id);
if (is_array($arrCriteria)) {
$id++;
$objCB = new \FrontendTemplate($res->template);
$objCB->items = $arrCriteria;
$objCB->title = $res->title;
$objCB->name = $res->id;
$objCB->selected = $arrSelected[$res->id];
$objCB->id = $id;
$arrBoxes[] = $objCB->parse();
}
}
/* jumpTo Page */
$arrJump = $this->Database->prepare('SELECT id, alias from tl_page where id=?')->execute($this->jumpTo)->fetchAssoc();
$this->Template->criterias = implode("\n", $arrBoxes);
$this->Template->href = $this->generateFrontendUrl($arrJump);
$this->Template->lblSubmit = $GLOBALS['TL_LANG']['articlefilter']['lblSubmit'];
$this->Template->selectedMatchType = \Input::get('afstype') ? \Input::get('afstype') : $this->articlefilter_defaultfilter;
$this->Template->lblMatches = $GLOBALS['TL_LANG']['articlefilter']['lblMatches'];
$this->Template->lblAny = $GLOBALS['TL_LANG']['articlefilter']['lblAny'];
$this->Template->lblAll = $GLOBALS['TL_LANG']['articlefilter']['lblAll'];
}
}
开发者ID:kozi,项目名称:contao-articlefilter,代码行数:34,代码来源:ModuleFilterForm.php
示例6: __construct
public function __construct()
{
// if the application wasn't defined before we will define it
if (!defined('NAMED_APPLICATION')) {
define('NAMED_APPLICATION', 'frontend');
}
// set the module
$this->setModule(SpoonFilter::getGetValue('module', null, ''));
// set the requested file
$this->setFile(SpoonFilter::getGetValue('file', null, ''));
// set the language
$this->setLanguage(SpoonFilter::getGetValue('language', FrontendLanguage::getActiveLanguages(), SITE_DEFAULT_LANGUAGE));
// create a new template instance (this will handle all stuff for us)
$tpl = new FrontendTemplate();
// enable addslashes on each locale
$tpl->setAddSlashes(true);
// set correct headers
SpoonHTTP::setHeaders('content-type: application/javascript');
// fetch the template path
if ($this->module == 'core') {
$file = FRONTEND_CORE_PATH . '/js/' . $this->getFile();
} else {
$file = FRONTEND_MODULES_PATH . '/' . $this->getModule() . '/js/' . $this->getFile();
}
// output the template
$tpl->display(FrontendTheme::getPath($file), true);
}
开发者ID:nickmancol,项目名称:forkcms-rhcloud,代码行数:27,代码来源:javascript.php
示例7: addCookiebarBuffer
/**
* Add the cookie HTML buffer
* @param string
* @return string
*/
public function addCookiebarBuffer($strContent)
{
if ($this->isCookiebarEnabled()) {
$objRoot = $this->getCurrentRootPage();
$objTemplate = new \FrontendTemplate('cookiebar_default');
$objTemplate->message = $objRoot->cookiebar_message;
$objTemplate->position = $objRoot->cookiebar_position;
$objTemplate->button = $objRoot->cookiebar_button;
$objTemplate->cookie = $this->getCookiebarName($objRoot);
$objTemplate->more = '';
// Add the "more" link
if ($objRoot->cookiebar_jumpTo > 0) {
$objJump = \PageModel::findByPk($objRoot->cookiebar_jumpTo);
if ($objJump !== null) {
$objJump->loadDetails();
$objTemplate->more = $GLOBALS['TL_LANG']['MSC']['more'];
$objTemplate->moreHref = ampersand($this->generateFrontendUrl($objJump->row(), null, $objJump->language));
$objTemplate->moreTitle = specialchars($GLOBALS['TL_LANG']['MSC']['more']);
}
}
// Place the cookiebar in DOM structure
if ($objRoot->cookiebar_placement === 'before_wrapper') {
$strContent = str_replace('<div id="wrapper">', $objTemplate->parse() . '<div id="wrapper">', $strContent);
} else {
$strContent = str_replace('</body>', $objTemplate->parse() . '</body>', $strContent);
}
}
return $strContent;
}
开发者ID:codefog,项目名称:contao-cookiebar,代码行数:34,代码来源:CookieBar.php
示例8: 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();
}
开发者ID:pandroid,项目名称:contao-filecredits,代码行数:28,代码来源:FileCredit.php
示例9: compile
/**
* Generate module
*/
protected function compile()
{
// Get ID
$strAlias = \Input::get('auto_item') ? \Input::get('auto_item') : \Input::get('store');
// Find published store from ID
if (($objStore = AnyStoresModel::findPublishedByIdOrAlias($strAlias)) !== null) {
// load all details
$objStore->loadDetails();
// generate description
$objDescription = \ContentModel::findPublishedByPidAndTable($objStore->id, $objStore->getTable());
if ($objDescription !== null) {
while ($objDescription->next()) {
$objStore->description .= \Controller::getContentElement($objDescription->current());
}
}
// Get referer for back button
$objStore->referer = $this->getReferer();
// generate google map if template and geodata is set
if ($this->anystores_mapTpl != '' && is_numeric($objStore->latitude) && is_numeric($objStore->longitude)) {
$objMapTemplate = new \FrontendTemplate($this->anystores_mapTpl);
$objMapTemplate->setData($objStore->row());
$objStore->gMap = $objMapTemplate->parse();
}
// Template
$objDetailTemplate = new \FrontendTemplate($this->anystores_detailTpl);
$objDetailTemplate->setData($objStore->row());
$this->Template->store = $objDetailTemplate->parse();
} else {
$this->_redirect404();
}
}
开发者ID:stefansl,项目名称:anyStores,代码行数:34,代码来源:ModuleAnyStoresDetails.php
示例10: compile
/**
* Generate the module
*/
protected function compile()
{
$navTpl = new \FrontendTemplate($this->navigationTpl ?: 'nav_default');
$navTpl->level = 0;
$navTpl->items = $this->buildNavigationItems();
$this->Template->navigation = $navTpl->parse();
}
开发者ID:terminal42,项目名称:contao-mp_forms,代码行数:10,代码来源:MPFormsStepsModule.php
示例11: parseMap
public function parseMap()
{
$objT = new \FrontendTemplate($this->strTemplate);
$objT->setData($GLOBALS['TL_LANG']['imagemapster']);
$objT->active = $this->active;
return $objT->parse();
}
开发者ID:heimrichhannot,项目名称:contao-imagemapster,代码行数:7,代码来源:ImageMapster.php
示例12: compile
protected function compile()
{
$strHtml = '';
$objTemplateTable = new \FrontendTemplate('hvv_tabelle');
if ($this->hvv_liga) {
$arrJson = json_decode(file_get_contents('http://service.mindbird.de/hvv-tabelle/www/' . $this->hvv_liga . '.json'), true);
$strHtmlTable = '';
foreach ($arrJson['table'] as $arrTeam) {
$objTemplate = new \FrontendTemplate('hvv_tabelle_zeile');
$objTemplate->position = $arrTeam['position'];
$objTemplate->team = $arrTeam['team'];
$objTemplate->games_count = $arrTeam['games']['count'];
$objTemplate->games_3031 = $arrTeam['games']['3031'];
$objTemplate->games_32 = $arrTeam['games']['32'];
$objTemplate->games_23 = $arrTeam['games']['23'];
$objTemplate->games_1303 = $arrTeam['games']['1303'];
$objTemplate->balls_positiv = $arrTeam['balls']['positiv'];
$objTemplate->balls_negativ = $arrTeam['balls']['negativ'];
$objTemplate->sets_positiv = $arrTeam['sets']['positiv'];
$objTemplate->sets_negativ = $arrTeam['sets']['negativ'];
$objTemplate->points = $arrTeam['points'];
if ($arrTeam['team'] == $this->hvv_mannschaft) {
$objTemplate->home_team = true;
}
$strHtmlTable .= $objTemplate->parse();
}
$objTemplateTable->strHtml = $strHtmlTable;
}
$this->Template->strHtml = $objTemplateTable->parse();
}
开发者ID:mindbird,项目名称:contao-hvv-tabelle,代码行数:30,代码来源:HVVTabelle.php
示例13: parseJs
protected function parseJs()
{
$objT = new \FrontendTemplate($this->strTemplate);
$objT->setData($this->arrData);
$objT->id = '#ctrl_' . $this->strName;
return $objT->parse();
}
开发者ID:heimrichhannot,项目名称:contao-dropzone,代码行数:7,代码来源:DropZone.php
示例14: parsePromoter
public function parsePromoter($objPromoter, $index = null, array $arrPromoters = array())
{
$strTemplate = $this->cal_promoterTemplate ? $this->cal_promoterTemplate : 'cal_promoter_default';
$objT = new \FrontendTemplate($strTemplate);
$objT->setData($objPromoter->row());
if ($objPromoter->room && ($objRoom = $objPromoter->getRelated('room')) !== null) {
$objT->room = $objRoom;
}
$contact = new \stdClass();
$hasContact = false;
if ($objPromoter->website) {
$objT->websiteUrl = \HeimrichHannot\Haste\Util\Url::addScheme($objPromoter->website);
}
foreach (static::$arrContact as $strField) {
if (!$objT->{$strField}) {
continue;
}
$hasContact = true;
$contact->{$strField} = $objT->{$strField};
}
$objT->hasContact = $hasContact;
$objT->contact = $contact;
$objT->contactTitle = $GLOBALS['TL_LANG']['cal_promoterlist']['contactTitle'];
$objT->phoneTitle = $GLOBALS['TL_LANG']['cal_promoterlist']['phoneTitle'];
$objT->faxTitle = $GLOBALS['TL_LANG']['cal_promoterlist']['faxTitle'];
$objT->emailTitle = $GLOBALS['TL_LANG']['cal_promoterlist']['emailTitle'];
$objT->websiteTitle = $GLOBALS['TL_LANG']['cal_promoterlist']['websiteTitle'];
if (!empty($arrPromoters) && $index !== null) {
$objT->cssClass = \HeimrichHannot\Haste\Util\Arrays::getListPositonCssClass($index, $arrPromoters);
}
return $objT->parse();
}
开发者ID:heimrichhannot,项目名称:contao-calendar_plus,代码行数:32,代码来源:PromoterController.php
示例15: replaceInsertTags
public function replaceInsertTags($strTag)
{
if (strstr($strTag, 'bootstrapResponsiveYoutubeEmbed')) {
$arrPieces = explode('::', $strTag);
$n = [];
if (!strstr($arrPieces[1], '?')) {
$id = $arrPieces[1];
} else {
$m = explode('?', $arrPieces[1]);
$id = $m[0];
$n = explode('&', $m[1]);
}
if ($id == '') {
return false;
}
$objTemplate = new \FrontendTemplate('ce_bootstrap_youtube_responsive_embed');
$objTemplate->movieId = $id;
$objTemplate->playerType = intval($id) ? 'vimeo' : 'youtube';
$objTemplate->playerAspectRatio = 'embed-responsive-4by3';
foreach ($n as $prop) {
$pieces = explode('=', $prop);
$objTemplate->{$pieces[0]} = $pieces[1];
}
return $objTemplate->parse();
}
return false;
}
开发者ID:markocupic,项目名称:bootstrap_responsive_youtube_embed,代码行数:27,代码来源:ReplaceInsertTags.php
示例16: createShareButtons
public static function createShareButtons($networks, $theme = self::DEFAULT_THEME, $template = self::DEFAULT_TEMPLATE, $url = null, $title = null, $description = null, $image = null)
{
// access to page
global $objPage;
// try to deserialize
if (is_string($networks)) {
$networks = deserialize($networks);
}
// if there are no networks, don't do anything
if (!is_array($networks) || count($networks) == 0) {
return '';
}
// process theme
if ($theme == 'sharebuttons_none' || $theme == 'none' || !in_array($theme, array_keys($GLOBALS['sharebuttons']['themes']))) {
$theme = '';
}
// force theme to fontawesome if fontawesome template is used
if (stripos($template, 'fontawesome') !== false && $theme !== '' && $theme !== 'text') {
$theme = 'fontawesome';
} elseif ($theme == 'fontawesome') {
$template = 'sharebuttons_fontawesome';
}
// check for empty template
if (!$template) {
$template = self::DEFAULT_TEMPLATE;
}
// create share buttons template
$objButtonsTemplate = new \FrontendTemplate($template);
// assign enabled networks to template
foreach ($networks as $network) {
$objButtonsTemplate->{$network} = true;
}
// determine the share image (e.g. for pinterest)
if (!$image && isset($GLOBALS['SOCIAL_IMAGES']) && is_array($GLOBALS['SOCIAL_IMAGES']) && count($GLOBALS['SOCIAL_IMAGES']) > 0) {
$image = \Environment::get('base') . $GLOBALS['SOCIAL_IMAGES'][0];
}
// assign url, title, theme, image, description to template
$objButtonsTemplate->url = rawurlencode($url ?: \Environment::get('base') . \Environment::get('request'));
$objButtonsTemplate->title = rawurlencode(strip_tags($title ?: ($objPage->pageTitle ?: $objPage->title)));
$objButtonsTemplate->theme = $theme;
$objButtonsTemplate->image = rawurlencode($image);
$objButtonsTemplate->description = rawurlencode(strip_tags($description ?: $objPage->description));
// add translations to template
$translations = $GLOBALS['TL_LANG']['sharebuttons'];
$translations['mail_subject'] = rawurlencode($translations['mail_subject']);
$objButtonsTemplate->lang = $translations;
// insert CSS if necessary
if ($theme) {
$GLOBALS['TL_CSS'][] = 'system/modules/sharebuttons/assets/base.css||static';
$css_theme = $GLOBALS['sharebuttons']['themes'][$theme][1];
if (is_file(TL_ROOT . '/' . $css_theme)) {
$GLOBALS['TL_CSS'][] = $css_theme . '||static';
}
}
// insert javascript
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/sharebuttons/assets/scripts.js|static';
// return parsed template
return $objButtonsTemplate->parse();
}
开发者ID:michelbalzer,项目名称:contao-sharebuttons,代码行数:59,代码来源:ShareButtons.php
示例17: generate
public function generate()
{
$GLOBALS['TL_JAVASCRIPT'][] = '/system/modules/uitotop/assets/js/jquery.ui.totop.js|static';
$GLOBALS['TL_CSS'][] = '/system/modules/uitotop/assets/css/ui.totop.css|screen|static';
$objTemplate = new \FrontendTemplate($this->strTemplate);
$objTemplate->text = $this->uitotop_text;
$GLOBALS['TL_BODY'][] = $objTemplate->parse();
}
开发者ID:mindbird,项目名称:contao-uitotop,代码行数:8,代码来源:UiToTop.php
示例18: addFont
/**
* @param $objWebfont
*/
public function addFont($objWebfont)
{
if ($objWebfont->enableTypekit) {
$objTemplate = new \FrontendTemplate($this->strTemplate);
$objTemplate->typekitId = $objWebfont->typekitId;
$GLOBALS['TL_HEAD'][] = $objTemplate->parse();
}
}
开发者ID:yfridelance,项目名称:contao-webfonts,代码行数:11,代码来源:AdobeTypekit.php
示例19: parseEmployee
/**
* Parse an item and return it as string
* @param object
* @param boolean
* @param string
* @param integer
* @return string
*/
protected function parseEmployee($objEmployee, $blnAddStaff = false, $strClass = '', $intCount = 0)
{
global $objPage;
$objTemplate = new \FrontendTemplate($this->staff_employee_template);
$objTemplate->setData($objEmployee->row());
$objTemplate->class = ($this->staff_employee_class != '' ? ' ' . $this->staff_employee_class : '') . $strClass;
if (!empty($objEmployee->education)) {
$objTemplate->education = deserialize($objEmployee->education);
}
$objTemplate->link = $this->generateEmployeeUrl($objEmployee, $blnAddStaff);
$objTemplate->staff = $objEmployee->getRelated('pid');
$objTemplate->txt_educations = $GLOBALS['TL_LANG']['MSC']['educations'];
$objTemplate->txt_contact = $GLOBALS['TL_LANG']['MSC']['contact'];
$objTemplate->txt_room = $GLOBALS['TL_LANG']['MSC']['room'];
$objTemplate->txt_phone = $GLOBALS['TL_LANG']['MSC']['phone'];
$objTemplate->txt_mobile = $GLOBALS['TL_LANG']['MSC']['mobile'];
$objTemplate->txt_fax = $GLOBALS['TL_LANG']['MSC']['fax'];
$objTemplate->txt_email = $GLOBALS['TL_LANG']['MSC']['email'];
$objTemplate->txt_website = $GLOBALS['TL_LANG']['MSC']['website'];
$objTemplate->txt_facebook = $GLOBALS['TL_LANG']['MSC']['facebook'];
$objTemplate->txt_googleplus = $GLOBALS['TL_LANG']['MSC']['googleplus'];
$objTemplate->txt_twitter = $GLOBALS['TL_LANG']['MSC']['twitter'];
$objTemplate->txt_linkedin = $GLOBALS['TL_LANG']['MSC']['linkedin'];
$objTemplate->count = $intCount;
// see #5708
$objTemplate->addImage = false;
// Add an image
if ($objEmployee->singleSRC != '') {
$objModel = \FilesModel::findByUuid($objEmployee->singleSRC);
if ($objModel === null) {
if (!\Validator::isUuid($objEmployee->singleSRC)) {
$objTemplate->text = '<p class="error">' . $GLOBALS['TL_LANG']['ERR']['version2format'] . '</p>';
}
} elseif (is_file(TL_ROOT . '/' . $objModel->path)) {
// Do not override the field now that we have a model registry (see #6303)
$arrEmployee = $objEmployee->row();
// Override the default image size
if ($this->imgSize != '') {
$size = deserialize($this->imgSize);
if ($size[0] > 0 || $size[1] > 0 || is_numeric($size[2])) {
$arrEmployee['size'] = $this->imgSize;
}
}
$arrEmployee['singleSRC'] = $objModel->path;
$strLightboxId = 'lightbox[lb' . $this->id . ']';
$arrEmployee['fullsize'] = $this->fullsize;
$this->addImageToTemplate($objTemplate, $arrEmployee, null, $strLightboxId);
}
}
$objTemplate->enclosure = array();
// Add enclosures
if ($objEmployee->addEnclosure) {
$this->addEnclosuresToTemplate($objTemplate, $objEmployee->row());
}
return $objTemplate->parse();
}
开发者ID:respinar,项目名称:contao-staff,代码行数:64,代码来源:ModuleStaff.php
示例20: generate
public function generate(array $arrOptions = array())
{
$this->arrOptions = array_merge($this->arrOptions, $arrOptions);
$arrData = $this->getData($this->arrOptions);
$strTemplate = sprintf('dlh_%s', $arrData['customTpl'] ?: strtolower($arrData['type']));
$objTemplate = new \FrontendTemplate($strTemplate);
$objTemplate->map = $arrData['map'];
$objTemplate->element = $arrData;
return $objTemplate->parse();
}
开发者ID:heimrichhannot,项目名称:contao-haste_plus,代码行数:10,代码来源:GoogleMapOverlay.php
注:本文中的FrontendTemplate类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论