/** * Requires that Craft is running an equal or better edition than what's passed in * * @param int $edition * @param bool $orBetter * * @throws Exception */ public function requireEdition($edition, $orBetter = true) { if ($this->isInstalled()) { $installedEdition = $this->getEdition(); if ($orBetter && $installedEdition < $edition || !$orBetter && $installedEdition != $edition) { throw new Exception(Craft::t('Craft {edition} is required to perform this action.', array('edition' => AppHelper::getEditionName($edition)))); } } }