CoolCMS API

EditRenewTrait

"Renew advert" section, shown only for an expired advert.

Tags
requires

EditAdvertFormTrait: shares $advert and checkAutorization()

Table of Contents

Methods

handleRenewAdvert()  : void
Handles the renewal signal of an expired advert.
isAdvertExpired()  : bool
Returns whether the advert is expired, so the "Renew" tab is offered.

Methods

handleRenewAdvert()

Handles the renewal signal of an expired advert.

public handleRenewAdvert() : void

Shares the computation with extending: extendExpiration() counts the new expiration from today for an expired advert (see the Api AdvertExpirationTrait).

isAdvertExpired()

Returns whether the advert is expired, so the "Renew" tab is offered.

protected isAdvertExpired() : bool
Return values
bool
On this page

Search results