getSetting($this->getCurrentContextId(), 'enabled'); } /** * Set whether or not this plugin is currently enabled. * @param $enabled boolean */ function setEnabled($enabled) { $this->updateSetting($this->getCurrentContextId(), 'enabled', $enabled, 'bool'); } /** * Get the current context ID or the site-wide context ID (0) if no context * can be found. */ function getCurrentContextId() { $context = PKPApplication::getRequest()->getContext(); return is_null($context) ? 0 : $context->getId(); } } ?>