class ElementReadyEvent extends GenericEvent (View source)

Properties

protected SitemapElement|null $element

The sitemap element (may be set to null by an event listener).

Methods

__construct(SitemapElement $element)

Initialize the instance.

getSubject()

{@inheritdoc}

getElement()

Get the sitemap element (may be set to null by an event listener).

$this
setElement(SitemapElement $newElement = null)

Replace the sitemap element (use NULL to skip a page).

Details

__construct(SitemapElement $element)

Initialize the instance.

Parameters

SitemapElement $element

getSubject()

{@inheritdoc}

See also

\Symfony\Component\EventDispatcher\GenericEvent::getSubject()

SitemapElement|null getElement()

Get the sitemap element (may be set to null by an event listener).

Return Value

SitemapElement|null

$this setElement(SitemapElement $newElement = null)

Replace the sitemap element (use NULL to skip a page).

Parameters

SitemapElement $newElement

Return Value

$this

Exceptions

InvalidArgumentException