FeedParameterAction
extends FeedParameterAction
in package
Value source for a feed node: a small code list (`input`, `getProductId`, `getProductSetName`, ...); {@see \App\UI\Api\Eshop\Models\Generators\FeedXmlGenerator} holds the map from `action.key` to callable. Read-mostly with no admin CRUD, so the entity has no presenter, only Manager/Service/Mapper/Repository for `findAll()` in the parameter edit select ({@see FeedParameter::$action}).
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_eshop_feed_parameter_actions'
- #[TableAlias]
- 'feedParameterAction'
Table of Contents
Properties
- $action : string
- $id : int|null
- $translations : Collection<int, FeedParameterActionText>
- $useTranslation : bool
Methods
- __construct() : mixed
- addTranslation() : $this
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAction() : string
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getId() : int|null
- getTranslation() : TTranslation|null
- getTranslations() : Collection<int, TTranslation>
- getUseTranslation() : bool
- isPersisted() : bool
- isUseTranslation() : bool
- removeTranslation() : $this
- setAction() : $this
- setId() : $this
- setTranslations() : $this
- setUseTranslation() : $this
- translationCollectionInit() : void
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$action
protected
string
$action
= ''
Attributes
- #[Column]
- $name: 'action'
- $type: 'string'
- $length: 100
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'feed_parameter_action_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$translations
protected
Collection<int, FeedParameterActionText>
$translations
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\FeedParameterActionText::class
- $mappedBy: 'parent'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$useTranslation
protected
bool
$useTranslation
= false
Attributes
- #[Column]
- $name: 'use_translation'
- $type: 'boolean'
Methods
__construct()
public
__construct([int|null $id = null ][, string $action = '' ][, bool $useTranslation = false ][, Collection $translations = new ArrayCollection() ]) : mixed
Parameters
- $id : int|null = null
- $action : string = ''
- $useTranslation : bool = false
- $translations : Collection = new ArrayCollection()
addTranslation()
public
addTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thiscallInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getAction()
public
getAction() : string
Return values
stringgetAllTraits()
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>getId()
public
getId() : int|null
Return values
int|nullgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>getUseTranslation()
public
getUseTranslation() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisUseTranslation()
public
isUseTranslation() : bool
Return values
boolremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetAction()
public
setAction(string $action) : $this
Parameters
- $action : string
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$thissetUseTranslation()
public
setUseTranslation(bool $useTranslation) : $this
Parameters
- $useTranslation : bool
Return values
$thistranslationCollectionInit()
public
translationCollectionInit() : void
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>