/** * @inheritDoc IComponentType::isSelectable() * * @return bool */ public function isSelectable() { // Only admins get the Get Help widget. if (parent::isSelectable() && craft()->userSession->isAdmin()) { return true; } return false; }
/** * @inheritDoc IComponentType::isSelectable() * * @return bool */ public function isSelectable() { // Gotta have update permission to get this widget if (parent::isSelectable() && craft()->userSession->checkPermission('performUpdates')) { return true; } return false; }
public function isSelectable() { $plugin = craft()->plugins->getPlugin('analytics'); $settings = $plugin->getSettings(); if (empty($settings['enableRealtime'])) { return false; } return parent::isSelectable(); }