本文整理匯總了PHP中StringUtils::l方法的典型用法代碼示例。如果您正苦於以下問題:PHP StringUtils::l方法的具體用法?PHP StringUtils::l怎麽用?PHP StringUtils::l使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類StringUtils
的用法示例。
在下文中一共展示了StringUtils::l方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: xmodule
protected function xmodule()
{
$this->parseChildren();
$element = $this->globals['INPUT_ELEMENT'];
$sectionType = $this->globals['INPUT_SECTIONTYPE'];
if (empty($element)) {
throw new Exception('XModule [' . $this->template->getName() . '] is missing POST parameter [element]');
}
$str = StringUtils::l("{% set DataSource %}node-sections{% end %}");
$str .= StringUtils::l("{% begin contents %}");
if (!empty($this->js)) {
$str .= StringUtils::l('<script type="text/javascript">');
$str .= StringUtils::l();
foreach ((array) $this->js as $line) {
$str .= StringUtils::l($line);
}
$str .= StringUtils::l();
$str .= StringUtils::l("document.sectionWidgets['{$sectionType}'].initializeSection(%TempSectionID%);");
$str .= StringUtils::l('</script>');
}
if (!empty($this->xhtml)) {
foreach ((array) $this->xhtml as $line) {
$str .= StringUtils::l($line);
}
}
$str .= StringUtils::l("{% end %}");
return $str;
}
示例2: _xmodule
protected function _xmodule()
{
$str = StringUtils::l("{% begin contents %}");
if (!empty($this->js)) {
$str .= StringUtils::l('<script type="text/javascript">');
$str .= StringUtils::l();
if (!self::$printedFieldClasses) {
$str .= StringUtils::l($this->_buildFieldClasses());
self::$printedFieldClasses = true;
}
$str .= StringUtils::l();
$str .= StringUtils::l(' $(document).ready(function() {');
$str .= StringUtils::l();
foreach ((array) $this->js as $line) {
$str .= StringUtils::l($line);
}
$str .= StringUtils::l();
$str .= StringUtils::l(' });');
$str .= StringUtils::l();
$str .= StringUtils::l('</script>');
}
if (!empty($this->xhtml)) {
foreach ((array) $this->xhtml as $line) {
$str .= StringUtils::l($line);
}
}
$str .= StringUtils::l("{% end %}");
return $str;
}
示例3: _xmodule
protected function _xmodule()
{
$element = $this->ElementService->getBySlug($this->globals['INPUT_ELEMENT']);
$ignoreAspects = array();
$ignore = $this->getParameter('ignore');
if (!empty($ignore)) {
$ignoreAspects = StringUtils::smartExplode($ignore);
}
$aspects = $element->getAspects();
$ordered = array();
foreach ((array) $aspects as $aspect) {
if (in_array($aspect['Slug'], $ignoreAspects)) {
continue;
}
$plugin = $this->PluginService->getByID($aspect['PluginID']);
$ordered[$plugin->Priority][] = $aspect;
}
ksort($ordered);
foreach ($ordered as $priority => $aspects) {
foreach ($aspects as $aspect) {
$template = $this->getTemplate($aspect);
if ($this->TemplateService->fileExists($template)) {
$this->xhtml[] = StringUtils::l("{% template {$template}?inherit=true %}");
}
}
}
$str = StringUtils::l("{% begin contents %}");
if (!empty($this->js)) {
$str .= StringUtils::l('<script type="text/javascript">');
$str .= StringUtils::l();
$str .= StringUtils::l(' $(document).ready(function() {');
$str .= StringUtils::l();
foreach ((array) $this->js as $line) {
$str .= StringUtils::l($line);
}
$str .= StringUtils::l();
$str .= StringUtils::l(' });');
$str .= StringUtils::l();
$str .= StringUtils::l('</script>');
}
if (!empty($this->xhtml)) {
foreach ((array) $this->xhtml as $line) {
$str .= StringUtils::l($line);
}
}
$str .= StringUtils::l("{% end %}");
return $str;
}