/**
* @see Plugin::register()
*/
function register($category, $path)
{
$success = parent::register($category, $path);
if ($success && $this->getEnabled()) {
$contextMap = $this->getContextMap();
$blockContext = $this->getBlockContext();
if (isset($contextMap[$blockContext])) {
$hookName = $contextMap[$blockContext];
HookRegistry::register($hookName, array($this, 'callback'));
}
}
return $success;
}