CoolCMS API

Feed extends BaseEntity
in package
implements IdentifiableInterface uses IdentifiableTrait

AbstractYes

XML feed definition (Heureka.cz, Zbozi.cz and similar): root and item tag (`rootTag`/`itemTag`), language and currency of values, and an item limit.

The parameter tree (FeedParameter) is not an owned collection of this entity: it is saved by its own dedicated path outside the generic object-graph save (see FeedParameter). categoryRels (FeedProductCategoryRel) is an owned collection (direct FK to the feed, no self-reference) and goes through the generic object-graph save, like Gift::$offerSets.

Tags
template
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'feed'

Table of Contents

Interfaces

IdentifiableInterface
Entity with a simple integer primary key. Most entities have one (often via {@see \App\Core\Traits\Shared\Models\Entities\IdentifiableTrait}); texts and links with a composite key do not, which is why `getId()` is not on {@see \App\Core\Base\BaseEntity}. Code that needs the id of a generic entity asks for this interface (parameter type, template bound, `instanceof`).

Properties

$categoryRels  : Collection<int, TCategoryRel>
$currency  : TCurrency|null
$id  : int|null
$itemLimit  : int
$itemTag  : string
$language  : TLanguage|null
$name  : string
$rootTag  : string
$urlName  : string

Methods

__construct()  : mixed
addCategoryRel()  : $this
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.
getCategoryRels()  : Collection<int, TCategoryRel>
getCurrency()  : TCurrency|null
getId()  : int|null
getItemLimit()  : int
getItemTag()  : string
getLanguage()  : TLanguage|null
getName()  : string
getRootTag()  : string
getUrlName()  : string
isPersisted()  : bool
setCategoryRels()  : $this
setCurrency()  : $this
setId()  : $this
setItemLimit()  : $this
setItemTag()  : $this
setLanguage()  : $this
setName()  : $this
setRootTag()  : $this
setUrlName()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$categoryRels

protected Collection<int, TCategoryRel> $categoryRels = new ArrayCollection()

$currency

protected TCurrency|null $currency = null

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'feed_id'
$type: 'integer'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$itemLimit

protected int $itemLimit = 0
Attributes
#[Column]
$name: 'item_limit'
$type: 'integer'
$options: ['unsigned' => true]

$itemTag

protected string $itemTag = ''
Attributes
#[Column]
$name: 'item_tag'
$type: 'string'
$length: 50

$language

protected TLanguage|null $language = null

$name

protected string $name = ''
Attributes
#[Column]
$name: 'name'
$type: 'string'
$length: 80

$rootTag

protected string $rootTag = ''
Attributes
#[Column]
$name: 'root_tag'
$type: 'string'
$length: 30

$urlName

protected string $urlName = ''
Attributes
#[Column]
$name: 'url_name'
$type: 'string'
$length: 50

Methods

__construct()

public __construct([int|null $id = null ][, string $name = '' ][, string $urlName = '' ][, string $rootTag = '' ][, string $itemTag = '' ][, mixed $language = null ][, mixed $currency = null ][, int $itemLimit = 0 ][, Collection $categoryRels = new ArrayCollection() ]) : mixed
Parameters
$id : int|null = null
$name : string = ''
$urlName : string = ''
$rootTag : string = ''
$itemTag : string = ''
$language : mixed = null
$currency : mixed = null
$itemLimit : int = 0
$categoryRels : Collection = new ArrayCollection()

addCategoryRel()

public addCategoryRel(TCategoryRel $categoryRel) : $this
Parameters
$categoryRel : TCategoryRel
Return values
$this

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>

getCategoryRels()

public getCategoryRels() : Collection<int, TCategoryRel>
Return values
Collection<int, TCategoryRel>

getCurrency()

public getCurrency() : TCurrency|null
Return values
TCurrency|null

getItemLimit()

public getItemLimit() : int
Return values
int

getItemTag()

public getItemTag() : string
Return values
string

getLanguage()

public getLanguage() : TLanguage|null
Return values
TLanguage|null

getName()

public getName() : string
Return values
string

getRootTag()

public getRootTag() : string
Return values
string

getUrlName()

public getUrlName() : string
Return values
string

setCategoryRels()

public setCategoryRels(Collection<int, TCategoryRel>|array<int, TCategoryRel> $categoryRels) : $this
Parameters
$categoryRels : Collection<int, TCategoryRel>|array<int, TCategoryRel>
Return values
$this

setCurrency()

public setCurrency(TCurrency|null $currency) : $this
Parameters
$currency : TCurrency|null
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setItemLimit()

public setItemLimit(int $itemLimit) : $this
Parameters
$itemLimit : int
Return values
$this

setItemTag()

public setItemTag(string $itemTag) : $this
Parameters
$itemTag : string
Return values
$this

setLanguage()

public setLanguage(TLanguage|null $language) : $this
Parameters
$language : TLanguage|null
Return values
$this

setName()

public setName(string $name) : $this
Parameters
$name : string
Return values
$this

setRootTag()

public setRootTag(string $rootTag) : $this
Parameters
$rootTag : string
Return values
$this

setUrlName()

public setUrlName(string $urlName) : $this
Parameters
$urlName : string
Return values
$this

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>
Return values
array<string, string>
On this page

Search results