本文整理匯總了PHP中HtmlHelper::createHtmlForNoneImage方法的典型用法代碼示例。如果您正苦於以下問題:PHP HtmlHelper::createHtmlForNoneImage方法的具體用法?PHP HtmlHelper::createHtmlForNoneImage怎麽用?PHP HtmlHelper::createHtmlForNoneImage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類HtmlHelper
的用法示例。
在下文中一共展示了HtmlHelper::createHtmlForNoneImage方法的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;
}