vendor/shopware/platform/src/Core/Content/Cms/DataResolver/FieldConfig.php line 7

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Content\Cms\DataResolver;
  3. use Shopware\Core\Framework\Struct\Struct;
  4. class FieldConfig extends Struct
  5. {
  6.     public const SOURCE_STATIC 'static';
  7.     public const SOURCE_MAPPED 'mapped';
  8.     public const SOURCE_PRODUCT_STREAM 'product_stream';
  9.     /**
  10.      * @var string
  11.      */
  12.     protected $name;
  13.     /**
  14.      * @var string
  15.      */
  16.     protected $source;
  17.     protected $value;
  18.     public function __construct(string $namestring $source$value)
  19.     {
  20.         $this->name $name;
  21.         $this->source $source;
  22.         $this->value $value;
  23.     }
  24.     public function getName(): string
  25.     {
  26.         return $this->name;
  27.     }
  28.     public function getSource(): string
  29.     {
  30.         return $this->source;
  31.     }
  32.     public function getValue()
  33.     {
  34.         return $this->value;
  35.     }
  36.     public function isStatic(): bool
  37.     {
  38.         return $this->source === self::SOURCE_STATIC;
  39.     }
  40.     public function isMapped(): bool
  41.     {
  42.         return $this->source === self::SOURCE_MAPPED;
  43.     }
  44.     public function isProductStream(): bool
  45.     {
  46.         return $this->source === self::SOURCE_PRODUCT_STREAM;
  47.     }
  48.     public function getApiAlias(): string
  49.     {
  50.         return 'cms_data_resolver_field_config';
  51.     }
  52. }