public function __construct(&$db) { parent::__construct('#__community_config', 'name', $db); // Get cache object. $oCache = CCache::inject($this); // Remove all cache on configuration change. $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, COMMUNITY_CACHE_TAG_ALL); }
/** * Constructor */ public function __construct(&$db) { parent::__construct('#__community_events', 'id', $db); // Get cache object. $oCache = CCache::inject($this); // Remove video cache on every delete & store $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_EVENTS, COMMUNITY_CACHE_TAG_EVENTS_CAT)); $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_EVENTS, COMMUNITY_CACHE_TAG_EVENTS_CAT)); }
/** * Constructor */ public function __construct(&$db) { parent::__construct('#__community_groups_category', 'id', $db); // Get cache object. $oCache = CCache::inject($this); // Remove groups category cache on every delete & store $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_GROUPS_CAT)); $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_GROUPS_CAT)); }
/** * Constructor */ function CTableVideosCategory(&$db) { parent::__construct('#__community_videos_category', 'id', $db); // Get cache object. $oCache = CCache::inject($this); // Remove video cache on every delete & store $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_VIDEOS_CAT)); $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_VIDEOS_CAT)); }
/** * Constructor */ function __construct(&$db) { parent::__construct('#__community_photos_albums', 'id', $db); // Get cache object. $oCache = CCache::inject($this); // Remove photo cache on album delete. $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_PHOTOS)); $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_ALBUMS)); }
/** * Constructor */ public function __construct(&$db) { parent::__construct('#__community_events', 'id', $db); // Get cache object. $oCache = CCache::inject($this); // Remove video cache on every delete & store $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_EVENTS, COMMUNITY_CACHE_TAG_EVENTS_CAT)); $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_EVENTS, COMMUNITY_CACHE_TAG_EVENTS_CAT)); // Set default timezone to current user's timezone $my = CFactory::getUser(); $this->offset = $my->getParam('timezone'); }
/** * Constructor */ public function __construct(&$db) { parent::__construct('#__community_photos_albums', 'id', $db); // General Permission as initial permission $this->permissions = 0; $my = CFactory::getUser(); $params = $my->getParams(); if ($my->id > 0 && $params->get('privacyPhotoView')) { $this->permissions = $params->get('privacyPhotoView'); } // Get cache object. $oCache = CCache::inject($this); // Remove photo cache on album delete. $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_PHOTOS)); $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_ALBUMS)); }
/** * Constructor */ public function __construct(&$db) { parent::__construct('#__community_videos', 'id', $db); require_once JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php'; CFactory::load('helpers', 'videos'); $config = CFactory::getConfig(); $this->_size = $config->get('videosSize'); $this->_width = CVideosHelper::getVideoSize('width'); $this->_height = CVideosHelper::getVideoSize('height'); $this->storage = 'file'; $this->hits = 0; // Get cache object. $oCache = CCache::inject($this); // Remove video cache on every delete & store $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_VIDEOS, COMMUNITY_CACHE_TAG_VIDEOS_CAT)); $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_VIDEOS, COMMUNITY_CACHE_TAG_VIDEOS_CAT)); // load helpers CFactory::load('helpers', 'string'); }
/** * Constructor */ public function __construct(&$db) { parent::__construct('#__community_likes', 'id', $db); }