// same for unregister hook
This commit is contained in:
@@ -128,6 +128,22 @@ class HookCore extends ObjectModel
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return hook ID from name
|
||||
*/
|
||||
public static function getNameById($hook_id)
|
||||
{
|
||||
$cache_id = 'hook_namebyid_'.$hook_id;
|
||||
if (!Cache::isStored($cache_id))
|
||||
Cache::store($cache_id, Db::getInstance()->getValue('
|
||||
SELECT `name`
|
||||
FROM `'._DB_PREFIX_.'hook`
|
||||
WHERE `id_hook` = '.(int)$hook_id)
|
||||
);
|
||||
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list of hook alias
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user