class SitemapPageAlternativeLanguage extends SitemapElement (View source)

Constants

DEFAULT_NAMESPACE

The default sitemap namespace.

MULTILINGUAL_NAMESPACE

The namespace required for the multilingual alternatives.

MULTILINGUAL_NAMESPACE_NAME

The alias of the namespace required for the multilingual alternatives.

Properties

protected Section $section The multilingual section associated to this alternative page.
protected Page $page The alternative page in the alternative language.
protected UrlInterface $url The URL of the alternative page.
protected bool $skip Should this alternative be skipped?
protected string $overriddenHrefLang The overridden hreflang value.

Methods

string[]|null
toXmlLines(string $indenter = ' ')

Returns the XML representation of this element.

toXmlElement(SimpleXMLElement $parentElement = null)

Returns a SimpleXMLElement instance representing this element.

string
getXmlMetaHeader()

Get the XML meta-header.

__construct(Section $section, Page $page, UrlInterface $url)

No description

getSection()

Get the multilingual section associated to this alternative page.

getPage()

Get the alternative page in the alternative language.

getUrl()

Get the URL of the alternative page.

$this
setUrl(UrlInterface $url)

Set the URL of the alternative page.

bool
isSkip()

Should this alternative be skipped?

$this
setSkip(bool $skip)

Should this alternative be skipped?

string
getOverriddenHrefLang()

Get the overridden hreflang value.

$this
setOverriddenHrefLang(string $overriddenHrefLang)

Set the overridden hreflang value.

string
getFinalHrefLang()

Get the final value of the href lang.

Details

string[]|null toXmlLines(string $indenter = ' ')

Returns the XML representation of this element.

Parameters

string $indenter The string used to indent the XML

Return Value

string[]|null Returns NULL in case no data should be generated, the XML lines otherwise

See also

\Concrete\Core\Page\Sitemap\Element\SitemapElement::toXmlLines()

SimpleXMLElement|null toXmlElement(SimpleXMLElement $parentElement = null)

Returns a SimpleXMLElement instance representing this element.

Parameters

SimpleXMLElement $parentElement

Return Value

SimpleXMLElement|null

See also

\Concrete\Core\Page\Sitemap\Element\SitemapElement::toXmlElement()

protected string getXmlMetaHeader()

Get the XML meta-header.

Return Value

string

__construct(Section $section, Page $page, UrlInterface $url)

Parameters

Section $section
Page $page
UrlInterface $url

Section getSection()

Get the multilingual section associated to this alternative page.

Return Value

Section

Page getPage()

Get the alternative page in the alternative language.

Return Value

Page

UrlInterface getUrl()

Get the URL of the alternative page.

Return Value

UrlInterface

$this setUrl(UrlInterface $url)

Set the URL of the alternative page.

Parameters

UrlInterface $url

Return Value

$this

bool isSkip()

Should this alternative be skipped?

Return Value

bool

$this setSkip(bool $skip)

Should this alternative be skipped?

Parameters

bool $skip

Return Value

$this

string getOverriddenHrefLang()

Get the overridden hreflang value.

Return Value

string

$this setOverriddenHrefLang(string $overriddenHrefLang)

Set the overridden hreflang value.

Parameters

string $overriddenHrefLang

Return Value

$this

protected string getFinalHrefLang()

Get the final value of the href lang.

Return Value

string