Back to PhocaGalleryRenderDetailButton class

Method getCloseText

public
getCloseText
(mixed $catidSlug, mixed $idSlug)

Method getCloseText - Source code

public function getCloseText($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) {
        //$onclick = 'onclick="window.parent.pgcbpi.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 = '<a style="text-decoration:underline" href="' . $href . '" ' . $onclick . ' title="' . Text::_('COM_PHOCAGALLERY_CLOSE_WINDOW') . '" >' . Text::_('COM_PHOCAGALLERY_CLOSE_WINDOW') . '</a>';
    return $close;
}