コード例 #1
0
ファイル: system.php プロジェクト: JexyRu/Ksenmart
 /**
  * KSSystem::getShopItemid()
  *
  * @return
  */
 public static function getShopItemid()
 {
     if (self::$_Itemid === null) {
         $db = JFactory::getDBO();
         $query = $db->getQuery(true);
         $query->select('id')->from('#__menu')->where('link LIKE ' . $db->quote('index.php?option=com_ksenmart&view=catalog&layout=catalog'))->where('published=1');
         $db->setQuery($query, 0, 1);
         $query;
         $menuitem = $db->loadObject();
         if (count($menuitem) > 0) {
             self::$_Itemid = $menuitem->id;
         } else {
             self::$_Itemid = '';
         }
     }
     return self::$_Itemid;
 }