本文整理汇总了PHP中TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::typolink_URL方法的典型用法代码示例。如果您正苦于以下问题:PHP ContentObjectRenderer::typolink_URL方法的具体用法?PHP ContentObjectRenderer::typolink_URL怎么用?PHP ContentObjectRenderer::typolink_URL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
的用法示例。
在下文中一共展示了ContentObjectRenderer::typolink_URL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ajax
private function ajax()
{
$viewAssign['type'] = 'ajax';
// Use ajax procedure
if ($this->settings['contenttype'] == 'reference') {
// Get the list of pid's
$uidList = $this->settings['content']['reference'];
$uidArray = explode(',', $uidList);
$pidInList = array();
foreach ($uidArray as $uid) {
$row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('pid', 'tt_content', 'uid=' . $uid);
$pidInList[] = $row['pid'];
}
// Configure the link
$linkconf = array();
$linkconf['parameter'] = $this->data['pid'];
if ($this->settings['useEidForAjaxMethod'] != 1) {
$linkconf['additionalParams'] = '&type=109&jh_magnificpopup[type]=reference&jh_magnificpopup[uid]=' . $this->settings['content']['reference'] . '&jh_magnificpopup[pid]=' . implode(',', $pidInList);
} else {
$linkconf['additionalParams'] = '&eID=jh_magnificpopup_ajax&jh_magnificpopup[type]=reference&jh_magnificpopup[uid]=' . $this->settings['content']['reference'] . '&jh_magnificpopup[pid]=' . implode(',', $pidInList);
}
} else {
// Configure the link
$linkconf = array();
$linkconf['parameter'] = $this->data['pid'];
if ($this->settings['useEidForAjaxMethod'] != 1) {
$linkconf['additionalParams'] = '&type=109&jh_magnificpopup[type]=inline&jh_magnificpopup[irre_parrentid]=' . $this->data['uid'];
} else {
$linkconf['additionalParams'] = '&eID=jh_magnificpopup_ajax&jh_magnificpopup[type]=inline&jh_magnificpopup[irre_parrentid]=' . $this->data['uid'];
}
}
// Link-setup
$lConf = array();
$lConf['ATagParams'] = 'class="mfp-ajax-' . $this->data['uid'] . '"';
$lConf['parameter'] = $linkconf['parameter'];
$lConf['additionalParams'] = $linkconf['additionalParams'];
// Support old way of link-setup. Will be removed later!
$viewAssign['link-class'] = 'mfp-ajax-' . $this->data['uid'];
$viewAssign['link'] = $this->cObj->typolink_URL($linkconf);
$viewAssign['link-text'] = $this->settings['mfpOption']['text'];
if ($this->settings['linktype'] == 'file') {
ArrayUtility::mergeRecursiveWithOverrule($viewAssign, $this->renderLinktypeFile($lConf));
} else {
$viewAssign['tsLink'] = $this->cObj->typolink($this->settings['mfpOption']['text'], $lConf);
}
// Get settings from flexform
// If something else than the default from setup is selected or a value is empty use setting from flexform
foreach ($this->settings['mfpOption'] as $key => $value) {
if ($value != -1 && !empty($value)) {
if ($value == 'local') {
$this->settings['type']['ajax'][$key] = $this->settings['mfpOption'][$key . '_local'];
} else {
$this->settings['type']['ajax'][$key] = $value;
}
}
}
$viewAssign['settings'] = $this->settings;
return $viewAssign;
}