FeedParameterRel
extends FeedParameterRel
in package
Per-product-set override of the value of one feed node: when a row exists for (parameter, productSet), the generator uses this `value` instead of the value computed by the node action.
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_eshop_feed_parameter_relations'
- #[TableAlias]
- 'feedParameterRel'
Table of Contents
Constants
- MODE_APPEND : string = 'append'
- The manual value goes after the automatic one (text: joined by a space; `multiple`: extra nodes after).
- MODE_CHANGE : string = 'change'
- The manual value replaces the automatic one (default).
- MODE_NONE : string = 'none'
- The tag is not sent to the feed at all for this product set: neither the manual nor the automatic value.
- MODE_PREPEND : string = 'prepend'
- The manual value goes before the automatic one (text: joined by a space; `multiple`: extra nodes before).
- MODES : array<string|int, mixed> = [self::MODE_CHANGE, self::MODE_PREPEND, self::M...
Properties
- $feedParameter : TFeedParameter|null
- $id : int|null
- $productSet : TProductSet|null
- $value : string|null
- $valueMode : string
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getFeedParameter() : TFeedParameter|null
- getId() : int|null
- getProductSet() : TProductSet|null
- getValue() : string|null
- getValueMode() : string
- isPersisted() : bool
- setFeedParameter() : $this
- setId() : $this
- setProductSet() : $this
- setValue() : $this
- setValueMode() : TProductSet>
- Sets the value mode; an unknown value falls back to {@see MODE_CHANGE}, because a mode must never silently change a feed.
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Constants
MODE_APPEND
The manual value goes after the automatic one (text: joined by a space; `multiple`: extra nodes after).
public
string
MODE_APPEND
= 'append'
MODE_CHANGE
The manual value replaces the automatic one (default).
public
string
MODE_CHANGE
= 'change'
MODE_NONE
The tag is not sent to the feed at all for this product set: neither the manual nor the automatic value.
public
string
MODE_NONE
= 'none'
MODE_PREPEND
The manual value goes before the automatic one (text: joined by a space; `multiple`: extra nodes before).
public
string
MODE_PREPEND
= 'prepend'
MODES
public
array<string|int, mixed>
MODES
= [self::MODE_CHANGE, self::MODE_PREPEND, self::MODE_APPEND, self::MODE_NONE]
whitelist for the manager guard and the form select
Properties
$feedParameter
protected
TFeedParameter|null
$feedParameter
= null
Attributes
- #[JoinColumn]
- $name: 'cms_mod_eshop_feed_parameters_feed_parameter_id'
- $referencedColumnName: 'feed_parameter_id'
- $nullable: false
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\FeedParameter::class
- $fetch: 'LAZY'
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'feed_parameter_relation_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$productSet
protected
TProductSet|null
$productSet
= null
Attributes
- #[JoinColumn]
- $name: 'cms_mod_eshop_product_sets_product_set_id'
- $referencedColumnName: 'product_set_id'
- $nullable: false
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductSet::class
- $fetch: 'LAZY'
$value
protected
string|null
$value
= null
Attributes
- #[Column]
- $name: 'value'
- $type: 'text'
- $nullable: true
$valueMode
protected
string
$valueMode
= self::MODE_CHANGE
Attributes
- #[Column]
- $name: 'value_mode'
- $type: 'string'
- $length: 10
- $options: ['default' => self::MODE_CHANGE]
Methods
__construct()
public
__construct([int|null $id = null ][, mixed $feedParameter = null ][, mixed $productSet = null ][, string|null $value = null ][, string $valueMode = self::MODE_CHANGE ]) : mixed
Parameters
- $id : int|null = null
- $feedParameter : mixed = null
- $productSet : mixed = null
- $value : string|null = null
- $valueMode : string = self::MODE_CHANGE
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getAllTraits()
Returns all traits the class uses, including those used by parent classes and nested traits.
public
getAllTraits() : array<string, string>
Return values
array<string, string>getFeedParameter()
public
getFeedParameter() : TFeedParameter|null
Return values
TFeedParameter|nullgetId()
public
getId() : int|null
Return values
int|nullgetProductSet()
public
getProductSet() : TProductSet|null
Return values
TProductSet|nullgetValue()
public
getValue() : string|null
Return values
string|nullgetValueMode()
public
getValueMode() : string
Return values
stringisPersisted()
public
isPersisted() : bool
Return values
boolsetFeedParameter()
public
setFeedParameter(TFeedParameter|null $feedParameter) : $this
Parameters
- $feedParameter : TFeedParameter|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetProductSet()
public
setProductSet(TProductSet|null $productSet) : $this
Parameters
- $productSet : TProductSet|null
Return values
$thissetValue()
public
setValue(string|null $value) : $this
Parameters
- $value : string|null
Return values
$thissetValueMode()
Sets the value mode; an unknown value falls back to {@see MODE_CHANGE}, because a mode must never silently change a feed.
public
setValueMode(string $valueMode) : TProductSet>
NOTE: @return self<...> is deliberate: a fluent setter in a generic MappedSuperclass
otherwise reports missingType.generics.
Parameters
- $valueMode : string
Return values
TProductSet>getTraitsRecursive()
Walks the trait list recursively and collects nested traits too.
private
static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
- $traits : array<string, string>