protected static function getVCategories() { if (is_null(self::$categories)) { self::$categories = new OC_VCategories('calendar', null, self::getDefaultCategories()); } return self::$categories; }
/** * @brief returns the vcategories object of the user * @return (object) $vcategories */ public static function getVCategories() { if (is_null(self::$categories)) { $categories = \OC::$server->getTagManager()->load('event'); if ($categories->isEmpty('event')) { self::scanCategories(); } self::$categories = \OC::$server->getTagManager()->load('event', self::getDefaultCategories()); } return self::$categories; }
/** * @brief returns the vcategories object of the user * @return (object) $vcategories */ public static function getVCategories() { if (is_null(self::$categories)) { if (OC_VCategories::isEmpty('event')) { self::scanCategories(); } self::$categories = new OC_VCategories('event', null, self::getDefaultCategories()); } return self::$categories; }