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

  • Comment
  • ConfigBlock
  • ConfigOperation
  • DeleteBlock
  • DeleteOperation
  • EditBlock
  • Hooks
  • ManageBlock
  • Model
  • Module
  • PatchOperation
  • PreviewOperation
  • SaveOperation
  • SubmitForm
  • Update20131208
  • ViewProvider

Class Comment

A comment.

ICanBoogie\Object implements ICanBoogie\ToArrayRecursive uses ICanBoogie\ToArrayRecursiveTrait, ICanBoogie\PrototypeTrait
Extended by ICanBoogie\ActiveRecord
Extended by Icybee\Modules\Comments\Comment implements Brickrouge\CSSClassNames uses Brickrouge\CSSClassNamesProperty
Namespace: Icybee\Modules\Comments
Located at vendor/icanboogie-modules/comments/lib/activerecord/comment.php

Methods summary

protected ICanBoogie\DateTime
# get_created_at( )

Returns the date and time the comment was created.

Returns the date and time the comment was created.

Returns

ICanBoogie\DateTime
protected
# set_created_at( DateTime|string $datetime )

Sets the date and time the comment was created.

Sets the date and time the comment was created.

Parameters

$datetime
DateTime|string
$datetime
protected ICanBoogie\DateTime
# get_updated_at( )

Returns the date and time the comment was updated.

Returns the date and time the comment was updated.

Returns

ICanBoogie\DateTime
protected
# set_updated_at( DateTime|string $datetime )

Sets the date and time the comment was updated.

Sets the date and time the comment was updated.

Parameters

$datetime
DateTime|string
$datetime
public
# __construct( string|Icybee\Modules\Comments\Model $model = 'comments' )

Defaults model to "comments".

Defaults model to "comments".

Parameters

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

Overrides

ICanBoogie\ActiveRecord::__construct
protected string
# get_url( )

Returns the URL of the comment.

Returns the URL of the comment.

The URL of the comment is created from the URL of the node and to identifier of the comment using the following pattern: {node.url}#comment{commentid}.

Returns

string
protected string
# get_absolute_url( )

Returns the absolute URL of the comment.

Returns the absolute URL of the comment.

Returns

string
protected string
# get_author_icon( )

Returns the URL of the author's Gravatar.

Returns the URL of the author's Gravatar.

Returns

string
public string
# excerpt( integer $limit = 55 )

Returns an HTML excerpt of the comment.

Returns an HTML excerpt of the comment.

Parameters

$limit
integer
$limit The maximum number of words to use to create the excerpt. Defaults to 55.

Returns

string
protected string
# lazy_get_excerpt( )

Returns an HTML excerpt of the comment.

Returns an HTML excerpt of the comment.

Returns

string
protected boolean
# get_is_author( )

Whether the author of the node is the author of the comment.

Whether the author of the node is the author of the comment.

Returns

boolean
true if the author is the same, false otherwise.
protected array[string]mixed
# get_css_class_names( )

Returns the CSS class names of the comment.

Returns the CSS class names of the comment.

Returns

array[string]mixed
public string
# __toString( )

Renders the comment into a HTML string.

Renders the comment into a HTML string.

Returns

string

Methods inherited from ICanBoogie\ActiveRecord

__sleep(), alter_persistent_properties(), delete(), get_model(), get_model_id(), save()

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

__get(), css_class(), get_css_class()

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 COMMENTID 'commentid'
#
string NID 'nid'
#
string PARENTID 'parentid'
#
string UID 'uid'
#
string AUTHOR 'author'
#
string AUTHOR_EMAIL 'author_email'
#
string AUTHOR_URL 'author_url'
#
string AUTHOR_IP 'author_ip'
#
string CONTENTS 'contents'
#
string STATUS 'status'
#
string STATUS_APPROVED 'approved'
#
string STATUS_PENDING 'pending'
#
string STATUS_SPAM 'spam'
#
string NOTIFY 'notify'
#
string CREATED_AT 'created_at'
#
string UPDATED_AT 'updated_at'
#

Properties summary

public integer $commentid
#

Comment identifier.

Comment identifier.

public integer $nid
#

Node identifier.

Node identifier.

public integer $parentid
#

Parent comment identifier.

Parent comment identifier.

public integer $uid
#

User identifier.

User identifier.

The user identifier is zero (0) if the user is a guest.

public string $author
#

Author name.

Author name.

public string $author_email
#

Author email.

Author email.

public string $author_url
#

Author's website URL.

Author's website URL.

public string $author_ip
#

Author IP.

Author IP.

public string $contents
#

Body of the comment.

Body of the comment.

public string $status
#

Status. One of pending, approved and spam.

Status. One of pending, approved and spam.

public string $notify
#

Notify status. One of no, yes, author and done.

Notify status. One of no, yes, author and done.

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 read-only string $absolute_url
#

URL of the comment.

URL of the comment.

public read-only string $author_icon
#

URL of the author's Gravatar.

URL of the author's Gravatar.

public read-only string $css_class
#

A suitable string for the HTML class attribute.

A suitable string for the HTML class attribute.

public read-only array $css_class_names
#

CSS class names.

CSS class names.

public read-only string $excerpt
#

HTML excerpt of the comment, made of the first 55 words.

HTML excerpt of the comment, made of the first 55 words.

public read-only boolean $is_author
#

true if the author of the comment is the author of the attached node.

true if the author of the comment is the author of the attached node.

public read-only Icybee\Modules\Nodes\Node $node
#

The node the comment is attached to.

The node the comment is attached to.

public read-only string $url
#

URL of the comment relative to the website.

URL of the comment relative to the website.

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