本文整理汇总了PHP中HtmlHelper::createHtmlForNoneIntroImage方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlHelper::createHtmlForNoneIntroImage方法的具体用法?PHP HtmlHelper::createHtmlForNoneIntroImage怎么用?PHP HtmlHelper::createHtmlForNoneIntroImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlHelper
的用法示例。
在下文中一共展示了HtmlHelper::createHtmlForNoneIntroImage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processImages
private function processImages(&$row, PluginConfiguration $config, &$matchesInIntro, &$matchesInText, $screenres, $showIntro)
{
$introCount = count($matchesInIntro);
$count = count($matchesInText);
jimport('joomla.application.component.model');
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_mosimage/models');
JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_mosimage/tables');
$model = JModelLegacy::getInstance('Options', 'MosimageModel');
$rowImage = $model->getItem($row->id);
$jsonObjectsList = $this->convertJsonToObjectArray($rowImage->imageslist);
$rowImageCount = count($jsonObjectsList);
$introImages = array();
for ($i = 0, $m = 0; $i < $introCount; $i++, $m++) {
$param = $this->getMosimageParameter($matchesInIntro[$m]);
if ($i < $rowImageCount) {
$introImages[] = HtmlHelper::createImageAndBuildHtml($jsonObjectsList[$i], $config, $screenres, $param);
} else {
$intoImages[] = HtmlHelper::createHtmlForNoneIntroImage($i);
}
}
if ($this->isTextContainIntroText($row) == true) {
$start = $introCount;
} else {
$start = 0;
}
if (empty($row->fulltext) || $showIntro == true) {
$start = 0;
}
$images = array();
for ($i = $start, $m = 0; $m < $count; $i++, $m++) {
$param = $this->getMosimageParameter($matchesInText[$m]);
if ($i < $rowImageCount && $rowImageCount > 0) {
$images[] = HtmlHelper::createImageAndBuildHtml($jsonObjectsList[$i], $config, $screenres, $param);
} else {
$images[] = HtmlHelper::createHtmlForNoneImage($i);
}
}
$result = new stdClass();
$result->introImages = $introImages;
$result->images = $images;
return $result;
}