BuildAdvertTrait
Builds the Advert entity from submitted values: the entity's own columns (password, IP, user, language, email, region, expiration). `categoryRels` is not populated; it is passed via meta in `processSubmit`. The hydrator would otherwise fail on a newly created advert (id=null) when generating the reference key for association-PK rel entities.
parameterRels is an owned collection and its insert path is solved (back-reference from the owner), so
AdvertForm::processSubmit() populates it directly on $advert (see applyParameterRels()),
also on a newly created advert from this trait.
Table of Contents
Methods
- buildAdvert() : Advert
- Builds the Advert entity from submitted values. Public: the consumer (or {@see \App\UI\Front\Bazaar\Components\AdvertFormComponent\AdvertForm::processSubmit()}) uses it to get a fully prepared entity without persistence.
- setExpirationDate() : void
Methods
buildAdvert()
Builds the Advert entity from submitted values. Public: the consumer (or {@see \App\UI\Front\Bazaar\Components\AdvertFormComponent\AdvertForm::processSubmit()}) uses it to get a fully prepared entity without persistence.
public
buildAdvert(ArrayHash $values[, string|null $passwordHash = null ]) : Advert
Parameters
- $values : ArrayHash
- $passwordHash : string|null = null
Return values
AdvertsetExpirationDate()
private
setExpirationDate(Advert $advert) : void
Parameters
- $advert : Advert