Back to PhocaGalleryRenderDetailButton class

Method getClose

public
getClose
(mixed $catidSlug, mixed $idSlug)

Method getClose - Source code

public function getClose($catidSlug, $idSlug)
{
    $app = Factory::getApplication();
    $params = $app->getParams();
    $detailWindow = $params->get('detail_window', 0);
    if ($detailWindow == 7) {
        return '';
    }
    $onclick = 'onclick="%onclickclose%"';
    if ($detailWindow == 9 || $detailWindow == 10 | $detailWindow == 13) {
        //$onclick = 'onclick="window.parent.pgcbp.close();"';
        return '';
        // Will be set in boxplus javascript
    }
    $i = explode(':', $idSlug);
    $id = $i[0];
    $alias = $i[1];
    $j = explode(':', $catidSlug);
    $catid = $j[0];
    $catalias = $j[1];
    $href = Route::_(PhocaGalleryRoute::getImageRoute($id, $catid, $alias, $catalias));
    $close = '<div class="pg-imgbgd"><a href="' . $href . '" ' . $onclick . ' title="' . Text::_('COM_PHOCAGALLERY_CLOSE_WINDOW') . '" >' . PhocaGalleryRenderFront::renderIcon('off', 'media/com_phocagallery/images/icon-exit.png', Text::_('COM_PHOCAGALLERY_CLOSE_WINDOW')) . '</a></div>';
    return $close;
}