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

  • CacheManager
  • ConfigBlock
  • ConfigOperation
  • Content
  • DeleteBlock
  • EditBlock
  • HomeExcludeOperation
  • HomeIncludeOperation
  • Hooks
  • ManageBlock
  • Model
  • Module
  • Rendered
  • SaveOperation
  • Update20140330
  • ViewProvider

Traits

  • DateProperty

Class Content

Representation of a content.

The Icybee\Modules\Contents\Content class extends the Icybee\Modules\Nodes\Node class with the following properties:

  • Icybee\Modules\Contents\Content::$subtitle: An optional subtitle.
  • Icybee\Modules\Contents\Content::$body: A body (with a customizable editor).
  • Icybee\Modules\Contents\Content::$excerpt: An optional excerpt, that can be generated from the body if it is not

defined.

  • $date: The date of the content.
  • Icybee\Modules\Contents\Content::$editor: The editor used to edit the body of the content.
  • Icybee\Modules\Contents\Content::$is_home_excluded: An additionnal visibility option.
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\Contents\Content uses Icybee\Modules\Contents\DateProperty

Direct known subclasses

Icybee\Modules\Articles\Article

Namespace: Icybee\Modules\Contents
Located at vendor/icanboogie-modules/contents/lib/activerecords/content.php

Methods summary

public static
# on_views_activerecordprovider_alter_result( Icybee\Modules\Views\ActiveRecordProvider\AlterResultEvent $event, Icybee\Modules\Views\ActiveRecordProvider $target )

Sets the $rendered_body property of the loaded records if suitable rendered bodies are available in the cache.

Sets the $rendered_body property of the loaded records if suitable rendered bodies are available in the cache.

Parameters

$event
Icybee\Modules\Views\ActiveRecordProvider\AlterResultEvent
$event
$target
Icybee\Modules\Views\ActiveRecordProvider
$target
protected string
# get_excerpt( )

Returns an excerpt of the body.

Returns an excerpt of the body.

The getter is invoked when the Icybee\Modules\Contents\Content::$excerpt property is not accessible.

Returns

string
public
# __construct( Icybee\Modules\Contents\Model|string $model = 'contents' )

The Icybee\Modules\Contents\Content::$excerpt property is unset if it is empty, until it is defined again, the Icybee\Modules\Contents\Content::get_excerpt() getter provides a default value made from the Icybee\Modules\Contents\Content::$body property.

The Icybee\Modules\Contents\Content::$excerpt property is unset if it is empty, until it is defined again, the Icybee\Modules\Contents\Content::get_excerpt() getter provides a default value made from the Icybee\Modules\Contents\Content::$body property.

Parameters

$model
Icybee\Modules\Contents\Model|string
$model Defaults to "contents".

Throws

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

Overrides

Icybee\Modules\Nodes\Node::__construct
public string
# __toString( )

Renders the body of the activerecord into a string.

Renders the body of the activerecord into a string.

The body is rendered using the editor that was used to edit the content.

A cache maybe used to store et retrieve the rendered content.

Returns

string
The rendered body.
protected string
# render_body( )

Renders the body using the associated editor.

Renders the body using the associated editor.

Returns

string
protected string
# get_year( )

Returns the year of the date.

Returns the year of the date.

Returns

string
protected string
# get_month( )

Returns the month of the date.

Returns the month of the date.

Returns

string
A padded string e.g. "02";
protected string
# get_day( )

Returns the day of the date.

Returns the day of the date.

Returns

string
A padded string e.g. "02";
protected Node|boolean
# lazy_get_previous( )

Overrides the method to support the date property.

Overrides the method to support the date property.

Returns

Node|boolean

Overrides

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

Overrides the method to support the date property.

Overrides the method to support the date property.

Returns

Node|boolean

Overrides

Icybee\Modules\Nodes\Node::lazy_get_next
public string
# excerpt( number $limit = 55 )

Returns an excerpt of the content.

Returns an excerpt of the content.

If the Icybee\Modules\Contents\Content::$excerpt property is not empty the excerpt is created from it, otherwise it is created from the Icybee\Modules\Contents\Content::$body.

Parameters

$limit
number
$limit The number of words desired.

Returns

string

Methods inherited from Icybee\Modules\Nodes\Node

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

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 Brickrouge\CSSClassNames

css_class()

Methods inherited from ICanBoogie\ToArrayRecursive

to_array_recursive()

Methods used from Icybee\Modules\Contents\DateProperty

get_date(), set_date()

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 SUBTITLE 'subtitle'
#
string BODY 'body'
#
string EXCERPT 'excerpt'
#
string DATE 'date'
#
string EDITOR 'editor'
#
string IS_HOME_EXCLUDED 'is_home_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 string $subtitle
#

Subtitle.

Subtitle.

public string $body
#

Body of the content.

Body of the content.

The body needs to be rendered by its editor in order to obtain the real body.

public string $excerpt
#

An excerpt of the body.

An excerpt of the body.

public string $editor
#

The identifier of the editor that was used to edit the body.

The identifier of the editor that was used to edit the body.

public boolean $is_home_excluded
#

true if the content should not appear on the "home" view.

true if the content should not appear on the "home" view.

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 ICanBoogie\DateTime $date
#

The date of the content.

The date of the content.

Magic properties inherited from Icybee\Modules\Nodes\Node

$created_at, $css_class, $native, $next, $previous, $site, $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