Property | Type | Description | |
---|---|---|---|
$code | Specifies the snippet code. |
Property | Type | Description | |
---|---|---|---|
$componentClass | Snippet component class name. | ||
$componentObj | Snippet component object. | ||
$description | Specifies the snippet description. | ||
$name | Specifies the snippet name. | ||
$pageSnippetMap | Internal cache of snippet declarations defined on a page. | ||
$properties | Snippet properties. |
Method | Description | |
---|---|---|
__construct ( ) | ||
clearMapCache ( Cms\Classes\Theme $theme ) | Clears the snippet map item cache | |
extendPartialForm ( $formWidget ) | Extends the partial form with Snippet fields. | |
getComponentClass ( ) : string | Returns the snippet component class name. | |
getDescription ( ) : string | Returns the snippet description. | |
getName ( ) : string | Returns the snippet name. | |
getProperties ( ) | Returns the snippet property list as array, in format compatible with Inspector. | |
initFromComponentInfo ( string $componentClass, string $componentCode ) | Initializes the snippet from a CMS component information. | |
initFromPartial ( $partial ) | Initializes the snippet from a CMS partial. | |
listPageComponents ( string $pageName, Cms\Classes\Theme $theme, $markup ) : array | Returns a list of component definitions declared on the page. | |
processPageMarkup ( string $pageName, Cms\Classes\Theme $theme, string $markup ) : string | Parses the static page markup and renders snippets defined on the page. | |
processTemplateSettings ( $template ) | ||
processTemplateSettingsArray ( $settingsArray ) |
Method | Description | |
---|---|---|
dropDownOptionsToArray ( $optionsString ) | ||
dropDownOptionsToString ( $optionsArray ) | ||
extractSnippetsFromMarkup ( $markup, $theme ) | ||
extractSnippetsFromMarkupCached ( $theme, $pageName, $markup ) | ||
getComponent ( ) : Cms\Classes\ComponentBase | Returns a component corresponding to the snippet. | |
getMapCacheKey ( $theme ) | Returns a cache key for this record. | |
parseIniProperties ( $properties ) : array | Converts a keyed object to an array, converting the index to the "property" value. | |
preprocessPropertyValues ( $theme, $snippetCode, $componentClass, $properties ) | Apples default property values and fixes property names. |
public static clearMapCache ( Cms\Classes\Theme $theme ) | ||
$theme | Cms\Classes\Theme | Specifies the current theme. |
protected static dropDownOptionsToArray ( $optionsString ) |
protected static dropDownOptionsToString ( $optionsArray ) |
public static extendPartialForm ( $formWidget ) |
protected static extractSnippetsFromMarkup ( $markup, $theme ) |
protected static extractSnippetsFromMarkupCached ( $theme, $pageName, $markup ) |
protected getComponent ( ) : Cms\Classes\ComponentBase | ||
return | Cms\Classes\ComponentBase |
public getComponentClass ( ) : string | ||
return | string | Returns the snippet component class name |
public getDescription ( ) : string | ||
return | string |
protected static getMapCacheKey ( $theme ) |
public getProperties ( ) |
public initFromComponentInfo ( string $componentClass, string $componentCode ) | ||
$componentClass | string | Specifies the component class. |
$componentCode | string | Specifies the component code. |
public initFromPartial ( $partial ) |
public static listPageComponents ( string $pageName, Cms\Classes\Theme $theme, $markup ) : array | ||
$pageName | string | Specifies the static page file name (the name of the corresponding content block file). |
$theme | Cms\Classes\Theme | Specifies a parent theme. |
return | array | Returns an array of component definitions |
protected static parseIniProperties ( $properties ) : array | ||
return | array |
protected static preprocessPropertyValues ( $theme, $snippetCode, $componentClass, $properties ) |
public static processPageMarkup ( string $pageName, Cms\Classes\Theme $theme, string $markup ) : string | ||
$pageName | string | Specifies the static page file name (the name of the corresponding content block file). |
$theme | Cms\Classes\Theme | Specifies a parent theme. |
$markup | string | Specifies the markup string to process. |
return | string | Returns the processed string. |
public static processTemplateSettingsArray ( $settingsArray ) |
protected static $pageSnippetMap |