NZTA\PromoOverlay\Extensions\PromoPageControllerExtension
Synopsis
class PromoPageControllerExtension
extends DataExtension
{
- // methods
- public HasManyList|null getActivePromoSlides()
- public array getActivePromoSlideData()
- public int getShouldDisplayOverlay()
- public string getPromoPageJsonData()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Methods
public
- getActivePromoSlideData() — Find the active {@link PromoPage} and get the slide data for the front end.
- getActivePromoSlides() — Find the active {@link PromoPage} and get the {@link PromoSlide}s attached to the page.
- getPromoPageJsonData() — Helper to get promo page data as JSON so javascript can access the data to generate the overlay if needed.
- getShouldDisplayOverlay() — Helper to determine whether the promo overlay should display on initial visit.