本文整理匯總了PHP中ApacheSolrForTypo3\Solr\Util::getTypoScriptValue方法的典型用法代碼示例。如果您正苦於以下問題:PHP Util::getTypoScriptValue方法的具體用法?PHP Util::getTypoScriptValue怎麽用?PHP Util::getTypoScriptValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ApacheSolrForTypo3\Solr\Util
的用法示例。
在下文中一共展示了Util::getTypoScriptValue方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: addJavascriptToPage
/**
* Adds all the loaded javascript files and snippets to the page.
*
* Depending on configuration the Javascript is added in header, footer or
* not at all if the integrator decides to take care of it himself.
*
*/
public function addJavascriptToPage()
{
$position = Util::getTypoScriptValue('plugin.tx_solr.javascriptFiles.loadIn');
if (empty($position)) {
$position = self::POSITION_NONE;
}
switch ($position) {
case self::POSITION_HEADER:
$this->addJavascriptToPageHeader();
break;
case self::POSITION_FOOTER:
$this->registerForRenderPreProcessHook();
break;
case self::POSITION_NONE:
// do nothing, JS is handled by the integrator
break;
default:
throw new \RuntimeException('Invalid value "' . $position . '" for Javascript position. Choose from "header", "footer", or "none".', 1336911986);
}
}