137 $results =
_elgg_services()->db->getData(
"SELECT * FROM {$this->CONFIG->dbprefix}entity_subtypes");
140 foreach ($results as
$row) {
235 $cache_obj = (object) array(
245 $id =
_elgg_services()->db->insertData(
"INSERT INTO {$this->CONFIG->dbprefix}entity_subtypes"
246 .
" (type, subtype, class) VALUES ('$type', '$subtype', '$class')");
249 $cache_obj->id =
$id;
277 .
" WHERE type = '$type' AND subtype = '$subtype'");
308 $unescaped_class =
$class;
315 SET type = '$type', subtype = '$subtype', class = '$class'
if(! $collection_name) $id
if(isset($vars['id'])) $class
getId($type, $subtype)
Return the id for a given subtype.
add($type, $subtype, $class="")
Register \ElggEntities with a certain type and subtype to be loaded as a specific class.
getSubtype($subtype_id)
Gets the denormalized string for a given subtype ID.
getClassFromId($subtype_id)
Returns the class name for a subtype id.
retrieveFromCache($type, $subtype)
Retrieve subtype from the cache.
update($type, $subtype, $class='')
Update a registered \ElggEntity type, subtype, and class name.
getClass($type, $subtype)
Return the class name for a registered type and subtype.
populateCache()
Fetch all suptypes from DB to local cache.
__construct()
Constructor.
global $SUBTYPE_CACHE
Cache subtypes and related class names.
sanitise_string($string)
Wrapper function for alternate English spelling (.
_elgg_retrieve_cached_subtype($type, $subtype)
Retrieve subtype from the cache.
get_subtype_id($type, $subtype)
Return the id for a given subtype.
_elgg_populate_subtype_cache()
Fetch all suptypes from DB to local cache.