private function processImagesDir(&$row, PluginConfiguration $config, &$matchesInIntro, &$matchesInText, $screenres, $showIntro = false) { $images = array(); $introImages = array(); for ($i = 0; $i < count($matchesInIntro); $i++) { try { $properies = MosimageDirProperties::parse($matchesInIntro[$i]); $imgagePropertiesAsArrayObject = $properies->getImgagePropertiesAsArrayObject(); if ($imgagePropertiesAsArrayObject) { $introImages[] = HtmlHelper::createImageAndBuildHtmlFromArrayObject($imgagePropertiesAsArrayObject, $config, $screenres); } else { $intoImages[] = HtmlHelper::createHtmlForNoneIntroImage($i); } } catch (Exception $e) { $introImages[] = '<p>' . $e->getMessage() . '</p>'; } } for ($i = 0; $i < count($matchesInText); $i++) { try { $properies = MosimageDirProperties::parse($matchesInText[$i]); $properies->align = 'left'; $imgagePropertiesAsArrayObject = $properies->getImgagePropertiesAsArrayObject(); if ($imgagePropertiesAsArrayObject) { $images[] = HtmlHelper::createImageAndBuildHtmlFromArrayObject($imgagePropertiesAsArrayObject, $config, $screenres); } else { $images[] = HtmlHelper::createHtmlForNoneImage($i); } } catch (Exception $e) { $images[] = '<p>' . $e->getMessage() . '</p>'; } } $result = new stdClass(); $result->introImages = $introImages; $result->images = $images; return $result; }