KWeb  6.4
KWebComment Class Reference
Inheritance diagram for KWebComment:
KWebObject_Attributable KWebObject

Public Member Functions

 __construct ()
 getStructures ($filter=false, array $options=array())
 Returns specified structure objects, or all of them.
 getObjectProperties ($data=true, $cache=true, $temp=false)
 Returns object properties as an array.
 initializeObjectData (array $data, $lang=false)
 Initializes object data using data mapping where necessary.
 getAccessRights ($apply=null, $userId=null)
 Returns all access rights for this object as an integer.
 getPrinter ()
 Zwraca tablicę identyfikatorów wyświetlania.
 getObjectId ()
 setObjectId ($newId)
 getObjectGenre ()
 getObjectType ()
 useObjectSynch ()
 canBeSearched ($userId=false)
 getParentId ()
 getParentGenre ()
 setParent ($uid)
 getParent ($object=true, $byOpenedPath=false)
 isPending ()
 canView ($userId=false)
 Sprawdza od razu czy możemy oglšdać sam element...
 canRemove ($userId=false)
 Uniwersalne zapytanie, czy user może usunšć ten element.
 canPublish ($userId=false)
 Uniwersalne zapytanie, czy user może publikować ten element.
 canEdit ($userId=false)
 canRSS ()
 getCreatedTime ()
 getModifiedTime ()
 getStatus ()
 getObjectOwner ($object=true)
 getUserName ($useEmail=false)
 getUserEmail ()
 getUserUrl ()
 getUserIP ()
 getTitle ($useText=true)
 getContent ()
 getInfo ($lang=false)
 
 setUserName ($user_name)
 setUserEmail ($user_email)
 setUserUrl ($user_url)
 setTitle ($title)
 setText ($text)
 getEditObject ($selection=true, $search=true)
 Returns version of this object ready for editing.
 getObjectDebug ()
 removeComment ()
 Usuwa kometarz ze sprawdzaniem uprawnień...
 isCurrentUserAuthor ()
 setPending ()
 setPublished ()
 commitUpdates ()
 Commits all pending updates to the data sources.
 getObjectCopy ($newData)

Static Public Member Functions

static getClassAttributes (array $options=array())
 Returns attribute table for this class.
static useObjectCache ()
static canComment (KWebObject $object, $userId=false)
static prepareSearch ($search)
static fetchCommentsForObjects ($objectUid, $pending=false)
static getCommentCount (KWebObject $parent, $status=ITEMS_PUBLISHED)
static createNewComment (KWebObject $parent, $type=self::TYPE_COMMENT, $user=null)
 Creates new comment.
static onObjectSwitchId ($genre, $oldId, $newId)
 Wywoływane, gdy jakiś obiekt zmieni swoje id.
static onObjectRemoveCommit (KWebEvent $event)

Data Fields

const TYPE_COMMENT = 'comment'
const TYPE_TRACKBACK = 'trackback'

Protected Attributes

 $comment_id
 $comment_lang
 $parent_id
 $parent_genre
 $user_id
 $status
 $type = self::TYPE_COMMENT
 $created
 $user_name
 $user_email
 $user_url
 $title
 $text
 $user_ip
 $properties

Constructor & Destructor Documentation

KWebComment::__construct ( )

Reimplemented from KWebObject.


Member Function Documentation

KWebComment::canBeSearched ( userId = false)

Reimplemented from KWebObject.

static KWebComment::canComment ( KWebObject object,
userId = false 
) [static]
KWebComment::canEdit ( userId = false)
KWebComment::canPublish ( userId = false)

Uniwersalne zapytanie, czy user może publikować ten element.

Reimplemented from KWebObject.

KWebComment::canRemove ( userId = false)

Uniwersalne zapytanie, czy user może usunšć ten element.

Reimplemented from KWebObject.

KWebComment::canRSS ( )

Reimplemented from KWebObject.

KWebComment::canView ( userId = false)

Sprawdza od razu czy możemy oglšdać sam element...

Reimplemented from KWebObject.

KWebComment::commitUpdates ( )

Commits all pending updates to the data sources.

Reimplemented from KWebObject_Attributable.

static KWebComment::createNewComment ( KWebObject parent,
type = self::TYPE_COMMENT,
user = null 
) [static]

Creates new comment.

Parameters:
$parentIdID elementu nadrzędnego
$dataDane początkowe...
Returns:
KWebComment
static KWebComment::fetchCommentsForObjects ( objectUid,
pending = false 
) [static]
KWebComment::getAccessRights ( apply = null,
userId = null 
)

Returns all access rights for this object as an integer.

Every access right is a flag

Reimplemented from KWebObject.

static KWebComment::getClassAttributes ( array $  options = array()) [static]

Returns attribute table for this class.

Once created, the table should be stored in a static value. The table should be read only.

Options contain 'genre', 'type' and 'object' for which this attribute table is needed. However, the best practice is to always return always the same, static attribute table.

Overriding classes should be responsible to clone the table and it's attributes and modify them if needed.

Returns:
KWebAttribute_Table_Class

Reimplemented from KWebObject_Attributable.

static KWebComment::getCommentCount ( KWebObject parent,
status = ITEMS_PUBLISHED 
) [static]
KWebComment::getContent ( )
KWebComment::getCreatedTime ( )
KWebComment::getEditObject ( selection = true,
search = true 
)

Returns version of this object ready for editing.

This may be the object itself, it's draft, or list of already existing drafts.

Parameters:
$selection- if FALSE, only single object will be returned in any circumstances, otherwise, an array of possible objects will be returned
$search- if TRUE, database will be searched for existing drafts. Otherwise, a new draft will be created
Returns:
KWeb_Item

Reimplemented from KWebObject_Attributable.

KWebComment::getInfo ( lang = false)

Reimplemented from KWebObject.

KWebComment::getModifiedTime ( )
KWebComment::getObjectCopy ( newData)
Returns:
KWebObject

Reimplemented from KWebObject.

KWebComment::getObjectDebug ( )

Reimplemented from KWebObject.

KWebComment::getObjectGenre ( )

Reimplemented from KWebObject.

KWebComment::getObjectId ( )

Reimplemented from KWebObject.

KWebComment::getObjectOwner ( object = true)
Returns:
KWebItem_User

Reimplemented from KWebObject.

KWebComment::getObjectProperties ( data = true,
cache = true,
temp = false 
)

Returns object properties as an array.

Returns:
array

Reimplemented from KWebObject_Attributable.

KWebComment::getObjectType ( )

Reimplemented from KWebObject.

KWebComment::getParent ( object = true,
byOpenedPath = false 
)
Returns:
KWebObject

Reimplemented from KWebObject.

KWebComment::getParentGenre ( )
KWebComment::getParentId ( )
KWebComment::getPrinter ( )

Zwraca tablicę identyfikatorów wyświetlania.

Wg. tej listy wyszukiwane są szablony w widokach - od ostatniego do pierwszego... Dla typów spoza rodzaju "item" identyfikatory powinny zawierać nazwę rodzaju aby nie wchodzić w konflikt z identyfikatorami z item.

Reimplemented from KWebObject.

KWebComment::getStatus ( )
KWebComment::getStructures ( filter = false,
array $  options = array() 
)

Returns specified structure objects, or all of them.

Parameters:
$filter- array of structure ids, or false for every one of them
Returns:
array of KWebStructure_Interface

Reimplemented from KWebObject.

KWebComment::getTitle ( useText = true)
KWebComment::getUserEmail ( )
KWebComment::getUserIP ( )
KWebComment::getUserName ( useEmail = false)
KWebComment::getUserUrl ( )
KWebComment::initializeObjectData ( array $  data,
lang = false 
)

Initializes object data using data mapping where necessary.

Parameters:
$dataObject's data as $name => $value
$langTranslation language or false for main data

Reimplemented from KWebObject.

KWebComment::isCurrentUserAuthor ( )
KWebComment::isPending ( )

Reimplemented from KWebObject.

static KWebComment::onObjectRemoveCommit ( KWebEvent event) [static]
static KWebComment::onObjectSwitchId ( genre,
oldId,
newId 
) [static]

Wywoływane, gdy jakiś obiekt zmieni swoje id.

Reimplemented from KWebObject.

static KWebComment::prepareSearch ( search) [static]
Parameters:
$searchKWebSearch

Reimplemented from KWebObject.

KWebComment::removeComment ( )

Usuwa kometarz ze sprawdzaniem uprawnień...

KWebComment::setObjectId ( newId)

Reimplemented from KWebObject.

KWebComment::setParent ( uid)
KWebComment::setPending ( )
KWebComment::setPublished ( )
KWebComment::setText ( text)
KWebComment::setTitle ( title)
KWebComment::setUserEmail ( user_email)
KWebComment::setUserName ( user_name)
KWebComment::setUserUrl ( user_url)
static KWebComment::useObjectCache ( ) [static]

Reimplemented from KWebObject.

KWebComment::useObjectSynch ( )

Reimplemented from KWebObject.


Field Documentation

KWebComment::$comment_id [protected]
KWebComment::$comment_lang [protected]
KWebComment::$created [protected]
KWebComment::$parent_genre [protected]
KWebComment::$parent_id [protected]
KWebComment::$properties [protected]
KWebComment::$status [protected]
KWebComment::$text [protected]
KWebComment::$title [protected]
KWebComment::$type = self::TYPE_COMMENT [protected]
KWebComment::$user_email [protected]
KWebComment::$user_id [protected]
KWebComment::$user_ip [protected]
KWebComment::$user_name [protected]
KWebComment::$user_url [protected]
const KWebComment::TYPE_COMMENT = 'comment'
const KWebComment::TYPE_TRACKBACK = 'trackback'

The documentation for this class was generated from the following file: