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

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. /**
  6.  * @deprecated tag:v6.5.0 - Use route defaults with "_acl". Example: @Route(defaults={"_acl"={"product:read"})
  7.  * @Annotation
  8.  */
  9. class Acl extends ConfigurationAnnotation
  10. {
  11.     /**
  12.      * @var array
  13.      */
  14.     private $value;
  15.     /**
  16.      * @return string
  17.      */
  18.     public function getAliasName()
  19.     {
  20.         Feature::triggerDeprecationOrThrow(
  21.             'v6.5.0.0',
  22.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0''"@Route(defaults={"_acl"={"product:read"})"')
  23.         );
  24.         return 'acl';
  25.     }
  26.     /**
  27.      * @return bool
  28.      */
  29.     public function allowArray()
  30.     {
  31.         Feature::triggerDeprecationOrThrow(
  32.             'v6.5.0.0',
  33.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0''"@Route(defaults={"_acl"={"product:read"})"')
  34.         );
  35.         return false;
  36.     }
  37.     public function getValue(): array
  38.     {
  39.         Feature::triggerDeprecationOrThrow(
  40.             'v6.5.0.0',
  41.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0''"@Route(defaults={"_acl"={"product:read"})"')
  42.         );
  43.         return $this->value;
  44.     }
  45.     public function setValue(array $privileges): void
  46.     {
  47.         Feature::triggerDeprecationOrThrow(
  48.             'v6.5.0.0',
  49.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0''"@Route(defaults={"_acl"={"product:read"})"')
  50.         );
  51.         $this->value $privileges;
  52.     }
  53. }