* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShop\PrestaShop\Core\Grid\Action\Row\AccessibilityChecker; /** * Class DeleteProfileAccessibilityChecker. * * @internal */ final class DeleteProfileAccessibilityChecker implements AccessibilityCheckerInterface { /** * @var int */ private $superAdminProfileId; /** * @param int $superAdminProfileId */ public function __construct($superAdminProfileId) { $this->superAdminProfileId = $superAdminProfileId; } /** * {@inheritdoc} */ public function isGranted(array $profile) { return $profile['id_profile'] != $this->superAdminProfileId; } }