Свойство | Тип | Описание | |
---|---|---|---|
$attributeNames | The array of custom attribute names. | ||
$implement | |||
$parentFileName | Contains the page parent file name. This property is used by the page editor internally. | ||
$rules | The rules to be applied to the data. | ||
$translatable | Attributes that support translation, if available. | ||
$translatableModel | Translation model used for translation, if available. |
Свойство | Тип | Описание | |
---|---|---|---|
$childrenCache | |||
$dirName | The container name associated with the model, eg: pages. | ||
$fillable | Properties that can be set with fill() | ||
$menuTreeCache | |||
$parentCache | |||
$processedBlockMarkupCache | |||
$processedMarkupCache | |||
$purgeable | List of attribute names which are not considered "settings". | ||
$wrapCode | Wrap code section in PHP tags. |
Метод | Описание | |
---|---|---|
__construct ( array $attributes = [] ) | Creates an instance of the object and associates it with a CMS theme. | |
afterCreate ( ) | Triggered after a new object is saved. | |
beforeCreate ( ) | Triggered before a new object is saved. | |
beforeValidate ( ) | Validates the object properties. | |
buildMenuTree ( Cms\Classes\Theme $theme ) : array | Builds and caches a menu item tree. | |
clearMenuCache ( Cms\Classes\Theme $theme ) | Clears the menu item cache | |
delete ( ) : array | Deletes the object from the disk. | |
fill ( array $attributes ) | Sets the object attributes. | |
getChildren ( ) : array | Returns all the child pages that belong to this one. | |
getLayoutObject ( ) : Cms\Classes\Layout | Looks up the Layout Cms object for this page. | |
getLayoutOptions ( ) : array | Returns a list of layouts available in the theme. | |
getMenuTypeInfo ( string $type ) : array | Handler for the pages.menuitem.getTypeInfo event. | |
getParent ( ) : mixed | Returns the parent page that belongs to this one, or null. | |
getPlaceholdersAttribute ( ) : array | Parses the page placeholder {% put %} tags and extracts the placeholder values. | |
getProcessedMarkup ( ) | ||
getProcessedPlaceholderMarkup ( $placeholderName, $placeholderContents ) | ||
getRichEditorTypeInfo ( string $type ) : array | Handler for the backend.richeditor.getTypeInfo event. | |
getTwigContent ( ) | Returns the Twig content string | |
initCmsComponents ( $cmsController ) | Initializes CMS components associated with the page. | |
listLayoutPlaceholders ( ) : array | Returns information about placeholders defined in the page layout. | |
listLayoutSyntaxFields ( ) | ||
resolveMenuItem ( RainLab\Pages\Classes\MenuItem $item, string $url, Cms\Classes\Theme $theme ) : mixed | Handler for the pages.menuitem.resolveItem event. | |
setPlaceholdersAttribute ( array $value ) : void | Takes an array of placeholder data (key: code, value: content) and renders it as a single string of Twig markup against the "code" attribute. | |
url ( $name ) : string | Helper that makes a URL for a static page in the active theme. |
Метод | Описание | |
---|---|---|
appendToMeta ( ) | Adds this page to the meta index. | |
flattenTwigNode ( $node ) : array | Recursively flattens a twig node and children | |
generateFilenameFromCode ( ) | * Generate a file name based on the URL | |
getMenuCacheKey ( $theme ) | Returns a cache key for this record. | |
getValidationAttributes ( ) : array | Returns the attributes used for validation. | |
listStaticPageMenuOptions ( ) : array | Returns a list of options for the Reference drop-down menu in the menu item configuration form, when the Static Page item type is selected. | |
removeFromMeta ( ) | Removes this page to the meta index. |
public __construct ( array $attributes = [] ) | ||
$attributes | array |
public beforeValidate ( ) |
public static buildMenuTree ( Cms\Classes\Theme $theme ) : array | ||
$theme | Cms\Classes\Theme | Specifies the current theme. |
Результат | array | Returns an array containing the page information |
public static clearMenuCache ( Cms\Classes\Theme $theme ) | ||
$theme | Cms\Classes\Theme | Specifies the current theme. |
protected flattenTwigNode ( $node ) : array | ||
$node | ||
Результат | array | A flat array of twig nodes |
protected generateFilenameFromCode ( ) |
public getChildren ( ) : array | ||
Результат | array |
public getLayoutObject ( ) : Cms\Classes\Layout | ||
Результат | Cms\Classes\Layout |
public getLayoutOptions ( ) : array | ||
Результат | array | Returns an array of strings. |
protected static getMenuCacheKey ( $theme ) |
public static getMenuTypeInfo ( string $type ) : array | ||
$type | string | Specifies the menu item type |
Результат | array | Returns an array |
public getPlaceholdersAttribute ( ) : array | ||
Результат | array | Returns an associative array of the placeholder names and values. |
public getProcessedPlaceholderMarkup ( $placeholderName, $placeholderContents ) |
public static getRichEditorTypeInfo ( string $type ) : array | ||
$type | string | Specifies the page link type |
Результат | array |
protected getValidationAttributes ( ) : array | ||
Результат | array |
public initCmsComponents ( $cmsController ) |
public listLayoutPlaceholders ( ) : array | ||
Результат | array | Returns an associative array of the placeholder name and codes. |
protected static listStaticPageMenuOptions ( ) : array | ||
Результат | array | Returns an array |
public static resolveMenuItem ( RainLab\Pages\Classes\MenuItem $item, string $url, Cms\Classes\Theme $theme ) : mixed | ||
$item | RainLab\Pages\Classes\MenuItem | Specifies the menu item. |
$url | string | Specifies the current page URL, normalized, in lower case The URL is specified relative to the website root, it includes the subdirectory name, if any. |
$theme | Cms\Classes\Theme | Specifies the current theme. |
Результат | mixed | Returns an array. Returns null if the item cannot be resolved. |
public setPlaceholdersAttribute ( array $value ) : void | ||
$value | array | |
Результат | void |
protected $dirName |
public $parentFileName |
protected $purgeable |
public $translatable |
public $translatableModel |