Back to PhocacartSection class

Method getSectionById

public static
getSectionById
(mixed $sectionId)

Method getSectionById - Source code

public static function getSectionById($sectionId)
{
    $db = Factory::getDBO();
    $query = ' SELECT id, title FROM #__phocacart_sections' . ' WHERE id = ' . (int) $sectionId . ' AND published = 1';
    $db->setQuery($query);
    $result = $db->loadObject();
    return $result;
}