Properties

Methods

setContextObject()

setContextObject(\Charcoal\Model\ModelInterface  $context) : mixed

Must call section if the context object is of type Section.

Parameters

\Charcoal\Model\ModelInterface $context

The current context.

Returns

mixed

sections()

sections() : \ArrayAccess|\Traversable

Returns

\ArrayAccess|\Traversable

masterSections()

masterSections() : \ArrayAccess|\Traversable

Returns

\ArrayAccess|\Traversable

childrenSections()

childrenSections() : \ArrayAccess|\Traversable

Returns

\ArrayAccess|\Traversable

routes()

routes() : string

Gets latest route for the given slug.

Returns

string —

The latest url.

currentSection()

currentSection(boolean  $raw = false) : array|\Charcoal\Cms\SectionInterface

Gets the current section based on AbstractTemplate::Section and context.

Parameters

boolean $raw

Option the receive the non-formatted section.

Returns

array|\Charcoal\Cms\SectionInterface

sectionFromSlug()

sectionFromSlug(string  $slug) : \Charcoal\Cms\SectionInterface|array

Parameters

string $slug

The section slug to load from.

Returns

\Charcoal\Cms\SectionInterface|array

setSection()

setSection(\Charcoal\Cms\SectionInterface  $section) : self

Parameters

\Charcoal\Cms\SectionInterface $section

The current section.

Returns

self

formatSection()

formatSection(\Charcoal\Cms\SectionInterface  $section) : array

Parameters

\Charcoal\Cms\SectionInterface $section

The section to format.

Returns

array