• ArrayAccess
  • Illuminate\Contracts\Support\Arrayable
  • Illuminate\Contracts\Support\Jsonable
  • JsonSerializable
  • Cms\Contracts\CmsObject

The CMS page class.

Public properties

public array $apiBag

The API bag allows the API handler code to bind arbitrary data to the page object.

public array $rules

The rules to be applied to the data.

Show inherited public properties

Inherited public properties

Protected properties

protected string $dirName

The container name associated with the model, eg: pages.

protected array $fillable

The attributes that are mass assignable.

Show inherited protected properties

Inherited protected properties

Public methods

public void __construct(array $attributes=array())

Creates an instance of the object and associates it with a CMS theme.

  • array $attributes

public mixed getCodeClassParent()

Returns name of a PHP class to us a parent for the PHP class created for the object's PHP section.

public array getLayoutOptions()

Returns a list of layouts available in the theme. This method is used by the form widget.

public static array getMenuTypeInfo(string $type)

Handler for the pages.menuitem.getTypeInfo event. Returns a menu item type information. The type information is returned as array with the following elements:

  • references - a list of the item type reference options. The options are returned in the ["key"] => "title" format for options that don't have sub-options, and in the format ["key"] => ["title"=>"Option title", "items"=>[...]] for options that have sub-options. Optional, required only if the menu item type requires references.
  • nesting - Boolean value indicating whether the item type supports nested items. Optional, false if omitted.
  • dynamicItems - Boolean value indicating whether the item type could generate new menu items. Optional, false if omitted.
  • cmsPages - a list of CMS pages (objects of the Cms\Classes\Page class), if the item type requires a CMS page reference to resolve the item URL.
  • string $type - Specifies the menu item type

public static array getNameList()

Helper that returns a nicer list of pages for use in dropdowns.

public static array getRichEditorTypeInfo(string $type)

Handler for the backend.richeditor.getTypeInfo event. Returns a menu item type information. The type information is returned as array

  • string $type - Specifies the page link type

public static mixed resolveMenuItem(RainLab\Pages\Classes\MenuItem $item, string $url, Cms\Classes\Theme $theme)

Handler for the pages.menuitem.resolveItem event. Returns information about a menu item. The result is an array with the following keys:

  • url - the menu item URL. Not required for menu item types that return all available records. The URL should be returned relative to the website root and include the subdirectory, if any. Use the Url::to() helper to generate the URLs.
  • isActive - determines whether the menu item is active. Not required for menu item types that return all available records.
  • items - an array of arrays with the same keys (url, isActive, items) + the title key. The items array should be added only if the $item's $nesting property value is TRUE.
  • RainLab\Pages\Classes\MenuItem $item - Specifies the menu item.
  • string $url - Specifies the current page URL, normalized, in lower case
  • Cms\Classes\Theme $theme - Specifies the current theme. The URL is specified relative to the website root, it includes the subdirectory name, if any.

public static string url(mixed $page, array $params=array())

Helper that makes a URL for a page in the active theme.

  • mixed $page - Specifies the Cms Page file name.
  • array $params - Route parameters to consider in the URL.

Show inherited public methods

Inherited public methods

Protected methods

Show inherited protected methods

Inherited protected methods

  • protected static void boot() - defined in Cms\Classes\CmsObject. The "booting" method of the model.
  • protected static void bootDefaultTheme() - defined in Cms\Classes\CmsObject. Boot all of the bootable traits on the model.
  • protected void bootIfNotBooted() - defined in October\Rain\Halcyon\Model. Check if the model needs to be booted and if so, do it.
  • protected void bootNicerEvents() - defined in October\Rain\Halcyon\Model. Bind some nicer events to this model, in the format of method overrides.
  • protected static void bootTraits() - defined in October\Rain\Halcyon\Model. Boot all of the bootable traits on the model.
  • protected void checkSafeMode() - defined in Cms\Classes\CmsCompoundObject. This method checks if safe mode is enabled by config, and the code.
  • protected array emitterEventSortEvents(string $eventName) - defined in October\Rain\Halcyon\Model. Sort the listeners for a given event by priority.
  • protected boolean extendableIsAccessible(mixed $class, string $propertyName) - defined in October\Rain\Extension\Extendable. Checks if a property is accessible, property equivalent of is_callable().
  • protected void extensionExtractMethods(string $extensionName, object $extensionObject) - defined in October\Rain\Extension\Extendable. Extracts the available methods from a behavior and adds it to the.
  • protected void fillViewBagArray() - defined in Cms\Classes\CmsCompoundObject. Copies view bag properties to the view bag array.
  • protected array fillableFromArray(array $attributes) - defined in October\Rain\Halcyon\Model. Get the fillable attributes of a given array.
  • protected void finishSave(array $options) - defined in October\Rain\Halcyon\Model. Finish processing on a successful save operation.
  • protected mixed fireModelEvent(string $event, bool $halt=true) - defined in October\Rain\Halcyon\Model. Fire the given event for the model.
  • protected array getArrayableAppends() - defined in October\Rain\Halcyon\Model. Get all of the appendable values that are arrayable.
  • protected mixed getAttributeFromArray(string $key) - defined in October\Rain\Halcyon\Model. Get an attribute from the $attributes array.
  • protected array getValidationAttributes() - defined in Cms\Classes\CmsObject. Returns the model data used for validation.
  • protected static Illuminate\Validation\Validator makeValidator($data, $rules, $customMessages, $attributeNames) - defined in Cms\Classes\CmsObject. Instantiates the validator used by the validation process, depending if the class is being used inside or.
  • protected mixed mutateAttribute(string $key, mixed $value) - defined in October\Rain\Halcyon\Model. Get the value of an attribute using its mutator.
  • protected mixed mutateAttributeForArray(string $key, mixed $value) - defined in October\Rain\Halcyon\Model. Get the value of an attribute using its mutator for array conversion.
  • protected bool originalIsNumericallyEquivalent(string $key) - defined in October\Rain\Halcyon\Model. Determine if the new and old values for a given key are numerically equivalent.
  • protected void parseComponentSettings() - defined in Cms\Classes\CmsCompoundObject. Parse component sections.
  • protected void parseSettings() - defined in Cms\Classes\CmsCompoundObject. Parses the settings array.
  • protected void performDeleteOnModel() - defined in October\Rain\Halcyon\Model. Perform the actual delete query on this model instance.
  • protected bool performInsert(October\Rain\Halcyon\Builder $query, array $options=array()) - defined in October\Rain\Halcyon\Model. Perform a model insert operation.
  • protected bool performUpdate(October\Rain\Halcyon\Builder $query, array $options=array()) - defined in October\Rain\Halcyon\Model. Perform a model update operation.
  • protected array processRuleFieldNames(array $rules) - defined in Cms\Classes\CmsObject. Processes field names in a rule array.
  • protected void processValidationRules($rules) - defined in Cms\Classes\CmsObject. Process rules.
  • protected static void registerModelEvent(string $event, Closure|string $callback, int $priority=0) - defined in October\Rain\Halcyon\Model. Register a model event with the dispatcher.
  • protected static void throwHalcyonException(Exception $ex) - defined in Cms\Classes\CmsObject. Converts an exception type thrown by Halcyon to a native CMS exception.
  • protected void validateSettings() - defined in Cms\Classes\CmsCompoundObject. If the model is loaded with an invalid INI section, the invalid content will be.