本文整理汇总了PHP中modResource::getContent方法的典型用法代码示例。如果您正苦于以下问题:PHP modResource::getContent方法的具体用法?PHP modResource::getContent怎么用?PHP modResource::getContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类modResource
的用法示例。
在下文中一共展示了modResource::getContent方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getContent
public function getContent(array $options = array())
{
if ($this->xpdo instanceof modX) {
$settings = $this->getContainerSettings();
if ($this->xpdo->getOption('commentsEnabled', $settings, true)) {
$this->getCommentsCall($settings);
$this->getCommentsReplyCall($settings);
$this->getCommentsCountCall($settings);
$this->xpdo->setPlaceholder('comments_enabled', 1);
} else {
$this->xpdo->setPlaceholder('comments_enabled', 0);
}
$this->getTagsCall($settings);
/** @var ArticlesContainer $container */
$container = $this->getOne('Container');
if ($container) {
$container->getArchivistCall();
$container->getLatestCommentsCall();
$container->getLatestPostsCall();
$container->getTagListerCall();
}
}
$content = parent::getContent($options);
return $content;
}
示例2: getContent
public function getContent(array $options = array())
{
$content = parent::getContent($options);
$language = $this->getLanguage();
$year = date('Y');
if (!($content = $this->lookForTranslations('content'))) {
$content = parent::getContent($options);
}
return $content;
}
示例3: getContent
public function getContent(array $options = array())
{
$content = '<div class="postBody">' . parent::getContent($options) . '</div>';
$conversation = $this->class_key . '-' . $this->id;
$properties = $this->getProperties('modxtalks');
$properties = array_merge(array('conversation' => $conversation), $properties);
$out = '';
foreach ($properties as $key => $property) {
$out .= "&{$key}=`{$property}`";
}
$content .= '[[$chankModxTalksStreak]][[!modxTalks?' . $out . ']]';
return $content;
}
示例4: getSourceFile
/**
* Get the absolute path to the static source file represented by this instance.
*
* @param array $options An array of options.
* @return string The absolute path to the static source file.
*/
public function getSourceFile(array $options = array())
{
if (empty($this->_sourceFile)) {
$filename = parent::getContent($options);
if (!empty($filename)) {
$array = array();
if ($this->xpdo->getParser() && $this->xpdo->parser->collectElementTags($filename, $array)) {
$this->xpdo->parser->processElementTags('', $filename);
}
}
if (!file_exists($filename)) {
$this->_sourcePath = $this->xpdo->getOption('resource_static_path', $options, $this->xpdo->getOption('base_path'));
if ($this->xpdo->getParser() && $this->xpdo->parser->collectElementTags($this->_sourcePath, $array)) {
$this->xpdo->parser->processElementTags('', $this->_sourcePath);
}
$this->_sourceFile = $this->_sourcePath . $filename;
} else {
$this->_sourceFile = $filename;
}
}
return $this->_sourceFile;
}
示例5: getContent
/**
* @param array $options
*
* @return string
*/
public function getContent(array $options = array())
{
$content = parent::getContent($options);
return $content;
}
示例6: getContent
/**
* Get, process and encode the content of this Resource
* @return void
*/
public function getContent()
{
$content = $this->resource->getContent();
$this->setPlaceholder('content', $this->hm->getTpl('widgets/text', array('text' => $this->safe($content, true))));
}