public static function renderAllCSS($noBootStrap = 0)
{
$app = Factory::getApplication();
$itemid = $app->input->get('Itemid', 0, 'int');
$db = Factory::getDBO();
$query = 'SELECT a.filename as filename, a.type as type, a.menulink as menulink' . ' FROM #__phocagallery_styles AS a' . ' WHERE a.published = 1' . ' ORDER BY a.type, a.ordering ASC';
$db->setQuery($query);
$filenames = $db->loadObjectList();
if (!empty($filenames)) {
foreach ($filenames as $fk => $fv) {
if ($noBootStrap == 1) {
$pos = strpos($fv->filename, 'bootstrap');
if ($pos === false) {
} else {
continue;
}
}
$path = PhocaGalleryFile::getCSSPath($fv->type, 1);
if ($fv->menulink != '' && (int) $fv->menulink > 1) {
$menuLinks = explode(',', $fv->menulink);
$isIncluded = in_array((int) $itemid, $menuLinks);
if ($isIncluded) {
//HTMLHelper::stylesheet($path . $fv->filename);
HTMLHelper::_('stylesheet', $path . $fv->filename, array('version' => 'auto'));
}
} else {
//HTMLHelper::stylesheet($path . $fv->filename);
HTMLHelper::_('stylesheet', $path . $fv->filename, array('version' => 'auto'));
}
}
}
}