/** * Loads all registered actions of the active package. */ protected function loadActions() { $environment = class_exists('wcf\\system\\WCFACP', false) || class_exists('wcf\\system\\CLIWCF', false) ? 'admin' : 'user'; $cache = EventListenerCacheBuilder::getInstance()->getData(); if (isset($cache['actions'][$environment])) { $this->actions = $cache['actions'][$environment]; } if (isset($cache['inheritedActions'][$environment])) { $this->inheritedActions = $cache['inheritedActions'][$environment]; } unset($cache); if (!is_array($this->actions)) { $this->actions = array(); } if (!is_array($this->inheritedActions)) { $this->inheritedActions = array(); } }
/** * @see wcf\system\package\plugin\IPackageInstallationPlugin::uninstall() */ public function uninstall() { parent::uninstall(); // clear cache immediately EventListenerCacheBuilder::getInstance()->reset(); }