_setItemClass("cApiNavMain"); } public function create($sName, $sLocation, $iId = NULL) { $oItem = $this->createNewItem($iId); if ($oItem->isLoaded()) { $oItem->set('name', $name); $oItem->set('location', $location); $oItem->store(); return $oItem; } } } class cApiNavMain extends Item { public function __construct($mId = false) { global $cfg; parent::__construct(cRegistry::getConfigValue('tab', 'nav_main'), 'idnavm'); if ($mId !== false) { $this->loadByPrimaryKey($mId); } } }