Back to PhocaDownloadSettings class

Method getLayoutText

public static
getLayoutText
(mixed $type)

Method getLayoutText - Source code

public static function getLayoutText($type)
{
    $db = Factory::getDBO();
    $query = 'SELECT a.' . $type . ' FROM #__phocadownload_layout AS a';
    $db->setQuery($query, 0, 1);
    $layout = $db->loadObject();
    /*if (!$db->query()) {
    			throw new Exception($db->getErrorMsg(), 500);
    			return false;
    		}*/
    if (isset($layout->{$type})) {
        return $layout->{$type};
    }
    return '';
}