public static function isSuperGroup(\user\models\Group $group) { if ($group->getSlug() == 'super_admin') { return true; } return false; }