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

  • AdjustNode
  • ConfigOperation
  • DeleteBlock
  • DeleteOperation
  • EditBlock
  • ExportBlock
  • ExportOperation
  • Helpers
  • Hooks
  • ImportOperation
  • ManageBlock
  • Model
  • Module
  • Node
  • OfflineOperation
  • OnlineOperation
  • PopNode
  • QueryOperationOperation
  • SaveOperation
  • TitleSlugCombo
  • Update20131208
  • Update20140405
  • ViewProvider

Functions

  • slugize

Class Node

A node representation.

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

Direct known subclasses

Icybee\Modules\Contents\Content, Icybee\Modules\Files\File, Icybee\Modules\Forms\Form, Icybee\Modules\Pages\Page

Indirect known subclasses

Icybee\Modules\Articles\Article, Icybee\Modules\Images\Image

Namespace: Icybee\Modules\Nodes
Located at vendor/icanboogie-modules/nodes/lib/activerecords/node.php

Methods summary

protected Icybee\Modules\Users\User
# get_user( )

Return the user owning the node.

Return the user owning the node.

Returns

Icybee\Modules\Users\User
protected
# set_user( Icybee\Modules\Users\User $user )

Updates the Icybee\Modules\Nodes\Node::$uid property using a Icybee\Modules\Users\User instance.

Updates the Icybee\Modules\Nodes\Node::$uid property using a Icybee\Modules\Users\User instance.

Parameters

$user
Icybee\Modules\Users\User
$user
protected Icybee\Modules\Sites\Site
# get_site( )

Returns the Icybee\Modules\Sites\Site instance associated with the node.

Returns the Icybee\Modules\Sites\Site instance associated with the node.

Returns

Icybee\Modules\Sites\Site
protected
# set_site( Icybee\Modules\Sites\Site $site )

Updates the Icybee\Modules\Nodes\Node::$siteid property using a Icybee\Modules\Sites\Site instance.

Updates the Icybee\Modules\Nodes\Node::$siteid property using a Icybee\Modules\Sites\Site instance.

Parameters

$site
Icybee\Modules\Sites\Site
$site
protected string
# get_slug( )

Returns the slug of the node.

Returns the slug of the node.

This function is only invoked if the Icybee\Modules\Nodes\Node::$slug property was empty during construct. By default it returns a normalized version of the Icybee\Modules\Nodes\Node::$title property.

Returns

string
protected string
# get_constructor( )

Returns the constructor of the page.

Returns the constructor of the page.

This function is only called if the Icybee\Modules\Nodes\Node::$constructor property was empty during construct. By default it returns the identifier of the model managing the node.

Returns

string
protected string
# get_language( )

Returns the language for the page.

Returns the language for the page.

This function is only called if the Icybee\Modules\Nodes\Node::$language property was empty during construct. By default it returns the language of the site associated with the node.

Returns

string
public
# __construct( string|Icybee\Modules\Nodes\Model $model = 'nodes' )

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\Nodes\Model
$model The model managing the active record. A Icybee\Modules\Nodes\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\Nodes\Model instance.

Overrides

ICanBoogie\ActiveRecord::__construct
public mixed
# __get( string $property )

Fires Brickrouge\AlterCSSClassNamesEvent after the $css_class_names property was get.

Fires Brickrouge\AlterCSSClassNamesEvent after the $css_class_names property was get.

Parameters

$property
string
$property

Returns

mixed
The value of the inaccessible property.

Throws

PropertyNotReadable
when the property has a protected or private scope and no suitable callback could be found to retrieve its value.
PropertyNotDefined
when the property is undefined and there is no suitable callback to retrieve its values.

Overrides

ICanBoogie\Object::__get
public integer
# save( )

Obtains a UUID from the model if the Icybee\Modules\Nodes\Node::$uuid property is empty.

Obtains a UUID from the model if the Icybee\Modules\Nodes\Node::$uuid property is empty.

Returns

integer
Primary key value of the active record.

Overrides

ICanBoogie\ActiveRecord::save
protected array
# alter_persistent_properties( array $properties, ICanBoogie\ActiveRecord\Model $model )

Sets $created_at to "now" if it is empty, and sets $updated_at to "now" before passing the method to the parent class.

Sets $created_at to "now" if it is empty, and sets $updated_at to "now" before passing the method to the parent class.

Adds language if it is not defined.

Parameters

$properties
array
$properties
$model

Returns

array
The altered persistent properties

Overrides

ICanBoogie\ActiveRecord::alter_persistent_properties
protected Icybee\Modules\Nodes\Node|boolean
# lazy_get_previous( )

Return the previous visible sibling for the node.

Return the previous visible sibling for the node.

Returns

Icybee\Modules\Nodes\Node|boolean
protected Icybee\Modules\Nodes\Node|boolean
# lazy_get_next( )

Return the next visible sibling for the node.

Return the next visible sibling for the node.

Returns

Icybee\Modules\Nodes\Node|boolean
protected
# lazy_get_translations_keys( )
public Icybee\Modules\Nodes\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

Icybee\Modules\Nodes\Node
The translation for the record, or the record itself if no translation could be found.
protected
# lazy_get_translation( )
protected
# lazy_get_translations( )
protected
# lazy_get_native( )

Return the native node for this translated node.

protected array[string]mixed
# get_css_class_names( )

Returns the CSS class names of the node.

Returns the CSS class names of the node.

Returns

array[string]mixed

Methods inherited from ICanBoogie\ActiveRecord

__sleep(), 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 ICanBoogie\ToArrayRecursive

to_array_recursive()

Methods inherited from Brickrouge\CSSClassNames

css_class()

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 NID 'nid'
#
string UID 'uid'
#
string SITEID 'siteid'
#
string UUID 'uuid'
#
string TITLE 'title'
#
string SLUG 'slug'
#
string CONSTRUCTOR 'constructor'
#
string CREATED_AT 'created_at'
#
string UPDATED_AT 'updated_at'
#
string IS_ONLINE 'is_online'
#
string LANGUAGE 'language'
#
string NATIVEID 'nativeid'
#

Properties summary

public integer $nid
#

Node key.

Node key.

public integer $uid
#

Identifier of the owner of the node.

Identifier of the owner of the node.

public integer $siteid
#

Identifier of the site the node belongs to.

Identifier of the site the node belongs to.

The property is empty of the node is not bound to a website.

public string $uuid
#

A v4 UUID.

A v4 UUID.

public string $title
#

Title of the node.

Title of the node.

public string $slug
#

Slug of the node.

Slug of the node.

public string $constructor
#

Constructor of the node.

Constructor of the node.

public boolean $is_online
#

Whether the node is online or not.

Whether the node is online or not.

public string $language
#

Language of the node.

Language of the node.

The property is empty of the node is not bound to a language.

public integer $nativeid
#

Identifier of the node this node is translating.

Identifier of the node this node is translating.

The property is empty if the node is not translating another node.

Properties inherited from ICanBoogie\ActiveRecord

$model_id

Magic properties

public ICanBoogie\DateTime $created_at
#

The date and time at which the node was created.

The date and time at which the node was created.

public ICanBoogie\DateTime $updated_at
#

The date and time at which the node was updated.

The date and time at which the node was updated.

public Icybee\Modules\Nodes\Node $native
#
public Icybee\Modules\Users\User $user
#

The user owning the node.

The user owning the node.

public Icybee\Modules\Sites\Site $site
#

The site associated with the node.

The site associated with the node.

public string $css_class
#

Icybee\Modules\Nodes\Node::get_css_class().

Icybee\Modules\Nodes\Node::get_css_class().

public read-only Icybee\Modules\Nodes\Node $next
#
public read-only Icybee\Modules\Nodes\Node $previous
#
public read-only Icybee\Modules\Nodes\Node $translation
#

Magic properties inherited from ICanBoogie\ActiveRecord

$model, $model_id

Magic properties inherited from ICanBoogie\Object

$prototype

Autodoc API documentation generated by ApiGen 2.8.0