PageManager provides abstraction level for the page lookup operations.

Public Methods

public static processLinks()

public static processLinks($markup): string 

processMarkup will replace links in content with resolved versions For example: ="october://xxx" → ="https://..."

public static processMarkup()

public static processMarkup($markup): string 

processMarkup converts links and snippets

public static processSnippets()

public static processSnippets($markup): string 

processSnippets will replace snippets in content

public static resolve()

public static resolve($address, $options = ]): [Cms\Models\PageLookupItem|null 

resolve is a helper that makes a page lookup item from a schema.

Supported options:

  • nesting: Boolean value requesting nested items. Optional, false if omitted.

public static url()

public static url($address): string 

url is a helper that makes a URL for a page lookup item.

Protected Methods

protected static extractSnippetsFromMarkup()

protected static extractSnippetsFromMarkup($markup, $theme): array 

protected static generateMarkupForComponent()

protected static generateMarkupForComponent($componentClass, $snippetInfo): void


protected static generateMarkupForPartial()

protected static generateMarkupForPartial($partialName, $snippetInfo): void

protected static preprocessPropertyValues()

protected static preprocessPropertyValues(
): void

preprocessPropertyValues applies default property values and fixes property names.

As snippet properties are defined with data attributes, they are lower case, whereas real property names are case sensitive. This method finds original property names defined in snippet classes or partials and replaces property names defined in the static page markup.