Autodoc
  • Namespace
  • Class
  • Tree

Namespaces

  • BlueTihi
    • Context
  • Brickrouge
    • Element
      • Nodes
    • Renderer
    • Widget
  • ICanBoogie
    • ActiveRecord
    • AutoConfig
    • CLDR
    • Composer
    • Core
    • Event
    • Exception
    • HTTP
      • Dispatcher
      • Request
    • I18n
      • Translator
    • Mailer
    • Modules
      • Taxonomy
        • Support
      • Thumbnailer
        • Versions
    • Object
    • Operation
      • Dispatcher
    • Prototype
    • Routes
    • Routing
      • Dispatcher
    • Session
  • Icybee
    • ActiveRecord
      • Model
    • ConfigOperation
    • Document
    • EditBlock
    • Element
      • ActionbarContextual
      • ActionbarSearch
      • ActionbarToolbar
    • FormBlock
    • Installer
    • ManageBlock
    • Modules
      • Articles
      • Cache
        • Collection
        • ManageBlock
      • Comments
        • ManageBlock
      • Contents
        • ManageBlock
      • Dashboard
      • Editor
        • Collection
      • Files
        • File
        • ManageBlock
      • Forms
        • Form
        • ManageBlock
      • I18n
      • Images
        • ManageBlock
      • Members
      • Modules
        • ManageBlock
      • Nodes
        • ManageBlock
        • Module
      • Pages
        • BreadcrumbElement
        • LanguagesElement
        • ManageBlock
        • NavigationBranchElement
        • NavigationElement
        • Page
        • PageController
      • Registry
      • Search
      • Seo
      • Sites
        • ManageBlock
      • Taxonomy
        • Terms
          • ManageBlock
        • Vocabulary
          • ManageBlock
      • Users
        • ManageBlock
        • NonceLogin
        • Roles
      • Views
        • ActiveRecordProvider
        • Collection
        • View
    • Operation
      • ActiveRecord
      • Constructor
      • Module
      • Widget
    • Rendering
  • None
  • Patron
  • PHP

Classes

  • Blueprint
  • BlueprintNode
  • BreadcrumbElement
  • Content
  • ContentModel
  • CopyOperation
  • DeleteOperation
  • EditBlock
  • ExportBlock
  • ExportOperation
  • Hooks
  • ImportOperation
  • LanguagesElement
  • ListView
  • ManageBlock
  • Model
  • Module
  • NavigationBranchElement
  • NavigationElement
  • NavigationExcludeOperation
  • NavigationIncludeOperation
  • Page
  • PageController
  • PopPage
  • PopTemplate
  • QueryOperationOperation
  • SaveOperation
  • TemplateEditorsOperation
  • UpdateTreeOperation

Class Page

Representation of a page.

ICanBoogie\Object implements ICanBoogie\ToArrayRecursive uses ICanBoogie\ToArrayRecursiveTrait, ICanBoogie\PrototypeTrait
Extended by ICanBoogie\ActiveRecord
Extended by Icybee\Modules\Nodes\Node implements Brickrouge\CSSClassNames uses Brickrouge\CSSClassNamesProperty, ICanBoogie\ActiveRecord\CreatedAtProperty, ICanBoogie\ActiveRecord\UpdatedAtProperty
Extended by Icybee\Modules\Pages\Page
Namespace: Icybee\Modules\Pages
Located at vendor/icanboogie-modules/pages/lib/activerecords/page.php

Methods summary

protected string
# get_template( )

Returns the template for the page.

Returns the template for the page.

This function is only called if the Icybee\Modules\Pages\Page::$pattern property was empty during construct. The template is guested according the place of the page in the hierarchy:

  • The page is the home page: home.html
  • The page has a parent which is not the home page: the template of the parent.
  • Otherwise: page.html

Returns

string
protected string
# get_extension( )

Returns the extension used by the page's template.

Returns the extension used by the page's template.

Returns

string
".html" if the template is "page.html".
protected string
# get_label( )

Returns the label for the page.

Returns the label for the page.

This function is only called if the Icybee\Modules\Pages\Page::$label property was empty during construct. It returns the Icybee\Modules\Nodes\Node::$title property.

Returns

string
public
# __construct( string|Icybee\Modules\Pages\Model $model = 'pages' )

Creates a Node instance.

Creates a Node instance.

The following properties are unset if they are empty, so that their getter may return a fallback value:

  • Icybee\Modules\Nodes\Node::$constructor: Defaults to the model identifier. Icybee\Modules\Nodes\Node::get_constructor().
  • Icybee\Modules\Nodes\Node::$language: Defaults to the associated site's language. Icybee\Modules\Nodes\Node::get_language().
  • Icybee\Modules\Nodes\Node::$slug: Defaults to a normalize title. Icybee\Modules\Nodes\Node::get_slug().

Parameters

$model
string|Icybee\Modules\Pages\Model
$model The model managing the active record. A Icybee\Modules\Pages\Model instance can be specified as well as a model identifier. If a model identifier is specified, the model is resolved when the $model property is accessed.

Throws

InvalidArgumentException
if $model is neither a model identifier nor a Icybee\Modules\Pages\Model instance.

Overrides

Icybee\Modules\Nodes\Node::__construct
public array
# __sleep( )

Removes the $model property.

Removes the $model property.

Properties whose value are instances of the ActiveRecord class are removed from the exported properties.

Returns

array

Overrides

ICanBoogie\ActiveRecord::__sleep
protected Icybee\Modules\Pages\Page|false
# lazy_get_previous( )

Returns the previous online sibling for the page.

Returns the previous online sibling for the page.

Returns

Icybee\Modules\Pages\Page|false
The previous sibling, or false if there is none.

Overrides

Icybee\Modules\Nodes\Node::lazy_get_previous
protected Icybee\Modules\Pages\Page|false
# lazy_get_next( )

Returns the next online sibling for the page.

Returns the next online sibling for the page.

Returns

Icybee\Modules\Pages\Page|false
The next sibling, or false if there is none.

Overrides

Icybee\Modules\Nodes\Node::lazy_get_next
protected string
# lazy_get_url( )

Returns the URL of the page.

Returns the URL of the page.

Returns

string
protected string
# lazy_get_absolute_url( )

Returns the absulte URL of the pages.

Returns the absulte URL of the pages.

Returns

string
The absolute URL of the page.
public Node
# translation( string $language = null )

Returns the translation in the specified language for the record, or the record itself if no translation can be found.

Returns the translation in the specified language for the record, or the record itself if no translation can be found.

Parameters

$language
string
$language The language for the translation. If the language is empty, the current language (as defined by $core->language) is used.

Returns

Node
The translation for the record, or the record itself if no translation could be found.

Overrides

Icybee\Modules\Nodes\Node::translation
protected
# lazy_get_translations( )

Overrides

Icybee\Modules\Nodes\Node::lazy_get_translations
protected string
# lazy_get_url_pattern( )

Returns the URL pattern of the page.

Returns the URL pattern of the page.

Returns

string
protected
# get_is_accessible( )

Returns if the page is accessible or not in the navigation tree.

Returns if the page is accessible or not in the navigation tree.

protected boolean
# get_is_home( )

Checks if the page is the home page.

Checks if the page is the home page.

A page is considered a home page when the page has no parent, its weight value is zero and it is online.

Returns

boolean
true if the page record is the home page, false otherwise.
protected boolean
# get_is_active( )

Checks if the page record is the active page.

Checks if the page record is the active page.

The global variable page must be defined in order to identify the active page.

Returns

boolean
true if the page record is the active page, false otherwise.

Todo-20130327:

create the set_active_page() and get_active_page() helpers ?
protected boolean
# get_is_trail( )

Checks if the page record is in the active page trail.

Checks if the page record is in the active page trail.

The global variable page must be defined in order to identifiy the active page.

Returns

boolean
true if the page is in the active page trail, false otherwise.
protected Icybee\Modules\Pages\Page|null
# get_location( )

Returns the location target for the page record.

Returns the location target for the page record.

Returns

Icybee\Modules\Pages\Page|null
The location target, or null if there is none.
protected Icybee\Modules\Pages\Page
# get_home( )

Returns the home page for the page record.

Returns the home page for the page record.

Returns

Icybee\Modules\Pages\Page
protected Icybee\Modules\Pages\Page|null
# lazy_get_parent( )

Returns the parent of the page.

Returns the parent of the page.

Returns

Icybee\Modules\Pages\Page|null
The parent page or null is the page has no parent.
protected
# lazy_get_children( )

Return the online children page for this page.

Return the online children page for this page.

TODO-20100629: The children virtual property should return all the children for the page, we should create a online_children virtual property that returns only _online_ children, or maybe a accessible_children virtual property ?

protected array[int]Page
# lazy_get_navigation_children( )

Returns the page's children that are online and part of the navigation.

Returns the page's children that are online and part of the navigation.

Returns

array[int]Page
protected boolean
# get_has_child( )

Checks if the page as at least one child.

Checks if the page as at least one child.

Returns

boolean
protected integer
# get_children_count( )

Returns the number of children.

Returns the number of children.

Returns

integer
protected integer
# get_descendents_count( )

Returns the number of descendent.

Returns the number of descendent.

Returns

integer
protected
# get_depth( )

Returns the depth level of this page in the navigation tree.

Returns the depth level of this page in the navigation tree.

protected array[string]\Icybee\Modules\Pages\Pages\Content
# lazy_get_contents( )

Returns the contents of the page as an array.

Returns the contents of the page as an array.

Keys of the array are the contentid, values are the contents objects.

Returns

array[string]\Icybee\Modules\Pages\Pages\Content
protected Icybee\Modules\Pages\Pages\Content
# lazy_get_body( )

Returns the body of this page.

Returns the body of this page.

The body is the page's contents object with the 'body' identifier.

Returns

Icybee\Modules\Pages\Pages\Content
protected array[string]mixed
# get_css_class_names( )

Replaces type value by "page" and id value by "page-id-<nid>".

Replaces type value by "page" and id value by "page-id-<nid>".

The following class names are added:

  • slug: "page-slug-<slug>"
  • home: true if the page is the home page.
  • active: true if the page is the active page.
  • trail: true if the page is in the breadcrumb trail.
  • node-id: "node-id-<nid>" if the page displays a node.
  • node-constructor: "node-constructor-<normalized_constructor>" if the page displays a node.
  • template: "template-<name>" the name of the page's template, without its extension.

Returns

array[string]mixed

Overrides

Icybee\Modules\Nodes\Node::get_css_class_names
protected
# get_description( )
protected
# get_document_title( )

Methods inherited from Icybee\Modules\Nodes\Node

__get(), alter_persistent_properties(), get_constructor(), get_language(), get_site(), get_slug(), get_user(), lazy_get_native(), lazy_get_translation(), lazy_get_translations_keys(), save(), set_site(), set_user()

Methods inherited from ICanBoogie\ActiveRecord

delete(), get_model(), get_model_id()

Methods inherited from ICanBoogie\Object

from(), resolve_facade_properties(), resolve_private_properties(), to_array(), to_json()

Methods inherited from Brickrouge\CSSClassNames

css_class()

Methods inherited from ICanBoogie\ToArrayRecursive

to_array_recursive()

Methods used from Brickrouge\CSSClassNamesProperty

css_class(), get_css_class()

Methods used from ICanBoogie\ActiveRecord\CreatedAtProperty

get_created_at(), set_created_at()

Methods used from ICanBoogie\ActiveRecord\UpdatedAtProperty

get_updated_at(), set_updated_at()

Methods used from ICanBoogie\ToArrayRecursiveTrait

to_array_recursive()

Methods used from ICanBoogie\PrototypeTrait

__call(), __set(), __wakeup(), get_prototype(), has_method(), has_property(), last_chance_get(), last_chance_set()

Magic methods summary

Constants summary

string PARENTID 'parentid'
#
string LOCATIONID 'locationid'
#
string PATTERN 'pattern'
#
string WEIGHT 'weight'
#
string TEMPLATE 'template'
#
string LABEL 'label'
#
string IS_NAVIGATION_EXCLUDED 'is_navigation_excluded'
#

Constants inherited from Icybee\Modules\Nodes\Node

CONSTRUCTOR, CREATED_AT, IS_ONLINE, LANGUAGE, NATIVEID, NID, SITEID, SLUG, TITLE, UID, UPDATED_AT, UUID

Properties summary

public integer $parentid
#

The identifier of the parent page.

The identifier of the parent page.

public integer $locationid
#

The identifier of the page the page is redirected to.

The identifier of the page the page is redirected to.

public string $pattern
#

The pattern used to create the URL of the nodes displayed by the page.

The pattern used to create the URL of the nodes displayed by the page.

public integer $weight
#

Weight of the page in the hierarchy.

Weight of the page in the hierarchy.

public string $template
#

Template used to render the page.

Template used to render the page.

public string $label
#

The text to use instead of the title when it is used in the navigation of the breadcrumb.

The text to use instead of the title when it is used in the navigation of the breadcrumb.

public boolean $is_navigation_excluded
#

Whether the page is excluded from the navigation.

Whether the page is excluded from the navigation.

public string $url_part
#

Part of the URL captured by the pattern.

Part of the URL captured by the pattern.

Todo-20130307:

rename as "path_part"
public array $url_variables
#

Variables captured from the URL using the pattern.

Variables captured from the URL using the pattern.

Todo-20130327:

rename as "path_params"
public Node $node
#

Node object currently acting as the body of the page.

Node object currently acting as the body of the page.

Todo-20130327:

use request's context instead
public boolean $cachable
#

true if the page is cachable, false otherwise.

true if the page is cachable, false otherwise.

Properties inherited from Icybee\Modules\Nodes\Node

$constructor, $is_online, $language, $nativeid, $nid, $siteid, $slug, $title, $uid, $uuid

Properties inherited from ICanBoogie\ActiveRecord

$model_id

Magic properties

public Icybee\Modules\Pages\Page $parent
#

Parent page of the page.

Parent page of the page.

public Icybee\Modules\Sites\Site $site
#

The site the page belongs to.

The site the page belongs to.

public read-only boolean $is_accessible
#

Whether the page is accessible or not.

Whether the page is accessible or not.

public read-only boolean $is_active
#

Wheter the page is active or not.

Wheter the page is active or not.

public read-only boolean $is_home
#

Whether the page is the home page of the site or not.

Whether the page is the home page of the site or not.

public read-only boolean $is_trail
#

Whether the page is in the navigation trail or not.

Whether the page is in the navigation trail or not.

public read-only integer $descendents_count
#

The number of descendents.

The number of descendents.

Magic properties inherited from Icybee\Modules\Nodes\Node

$created_at, $css_class, $native, $next, $previous, $translation, $updated_at, $user

Magic properties inherited from ICanBoogie\ActiveRecord

$model, $model_id

Magic properties inherited from ICanBoogie\Object

$prototype

Magic properties used from Brickrouge\CSSClassNamesProperty

$css_class

Autodoc API documentation generated by ApiGen 2.8.0