vendor/shopware/core/Framework/Routing/Annotation/Acl.php line 57

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Framework\Routing\Annotation;
  3. use Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationAnnotation;
  4. use Shopware\Core\Framework\Feature;
  5. use Shopware\Core\Framework\Log\Package;
  6. /**
  7.  * @deprecated tag:v6.5.0 - Use route defaults with "_acl". Example: @Route(defaults={"_acl"={"product:read"})
  8.  * @Annotation
  9.  */
  10. #[Package('system-settings')]
  11. class Acl extends ConfigurationAnnotation
  12. {
  13.     /**
  14.      * @var array
  15.      */
  16.     private $value;
  17.     /**
  18.      * @return string
  19.      */
  20.     public function getAliasName()
  21.     {
  22.         Feature::triggerDeprecationOrThrow(
  23.             'v6.5.0.0',
  24.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0''"@Route(defaults={"_acl"={"product:read"})"')
  25.         );
  26.         return 'acl';
  27.     }
  28.     /**
  29.      * @return bool
  30.      */
  31.     public function allowArray()
  32.     {
  33.         Feature::triggerDeprecationOrThrow(
  34.             'v6.5.0.0',
  35.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0''"@Route(defaults={"_acl"={"product:read"})"')
  36.         );
  37.         return false;
  38.     }
  39.     public function getValue(): array
  40.     {
  41.         Feature::triggerDeprecationOrThrow(
  42.             'v6.5.0.0',
  43.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0''"@Route(defaults={"_acl"={"product:read"})"')
  44.         );
  45.         return $this->value;
  46.     }
  47.     public function setValue(array $privileges): void
  48.     {
  49.         Feature::triggerDeprecationOrThrow(
  50.             'v6.5.0.0',
  51.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0''"@Route(defaults={"_acl"={"product:read"})"')
  52.         );
  53.         $this->value $privileges;
  54.     }
  55. }