Back to PhocacartSection class

Method existsSection

public static
existsSection
(mixed $sectionId)

Method existsSection - Source code

public static function existsSection($sectionId)
{
    $db = Factory::getDBO();
    $query = ' SELECT id FROM #__phocacart_sections' . ' WHERE id = ' . (int) $sectionId . ' AND published = 1';
    $db->setQuery($query);
    $result = $db->loadResult();
    if (isset($result) && (int) $result > 0) {
        return $result;
    }
    return false;
}