Content
__construct
(mixed $content_id)
Redefined in descendants as:
Check if a user is one of the owners of the object
true
addOwner
(User $user, [$is_author $is_author = false])
-
$user
$user: The user to be added to the owners list
-
$is_author
$is_author: Optionnal, true or false. Set to true if the user is one of the actual authors of the Content
Create a new Content object in the database
the
createNewObject
([$content_type $content_type = 'Content'], [$id $id = null])
-
$content_type
$content_type: Optionnal, the content type to be given to the new object
-
$id
$id: Optionnal, the id to be given to the new Content. If null, a new id will be assigned
void
delete
(mixed &$errmsg)
Redefined in descendants as:
Remove an owner of the content
void
deleteOwner
(User $user, [mixed $is_author = false])
-
$user
$user: The user to be removed from the owners list
Retreives the admin interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
string
getAdminUI
([string $subclass_admin_interface = null])
-
string
$subclass_admin_interface: HTML content of the interface element of a children.
Redefined in descendants as:
Get all content, can be restricted to a given content type
void
getAllContent
([mixed $content_type = ""])
Redefined in descendants as:
Get the authors of the Content
null
getAuthors
()
Get the list of available content type on the system
an
getAvailableContentTypes
()
Get an interface to create a new object.
html
getCreateNewObjectUI
()
Get content description
content
getDescription
()
Get the PHP timestamp of the last time this content was displayed
PHP
getLastDisplayTimestamp
([$user $user = null], [$node $node = null])
-
$user
$user: User, Optional, if present, restrict to the selected user
-
$node
$node: Node, Optional, if present, restrict to the selected node
Get a flexible interface to manage content linked to a node, a network or anything else
html
getLinkedContentUI
($user_prefix $user_prefix, $content_type $link_table, mixed $link_table_obj_key_col, mixed $link_table_obj_key, mixed $display_location)
-
$user_prefix
$user_prefix: A identifier provided by the programmer to recognise it's generated html form
-
$content_type
$link_table: If set, the created content will be of this type, otherwise, the user will have to chose
Retreives the list interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
The
getListUI
([$subclass_admin_interface $subclass_list_interface = null])
-
$subclass_admin_interface
$subclass_list_interface: Html content of the interface element of a children
Indicates display logging status
void
getLoggingStatus
()
Get content long description
content
getLongDescription
()
Get a flexible interface to generate new content objects
html
getNewContentUI
($user_prefix $user_prefix, [$content_type $content_type = null])
-
$user_prefix
$user_prefix: A identifier provided by the programmer to recognise it's generated html form
-
$content_type
$content_type: If set, the created content will be of this type, otherwise, the user will have to chose
Get the Content object, specific to it's content type
the
getObject
($content_id $content_id)
-
$content_id
$content_id: The content id
Get the true object type represented by this isntance
an
getObjectType
()
Get content project info
content
getProjectInfo
()
Get an interface to pick content from all persistent content.
html
getSelectContentUI
($user_prefix $user_prefix, [mixed $sql_additional_where = null])
-
$user_prefix
$user_prefix: A identifier provided by the programmer to recognise it's generated html form
Get content sponsor info
content
getSponsorInfo
()
Get content title
content
getTitle
()
Retreives the user interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
The
getUserUI
([$subclass_admin_interface $subclass_user_interface = null])
-
$subclass_admin_interface
$subclass_user_interface: Html content of the interface element of a children
Redefined in descendants as:
-
ContentGroup::getUserUI()
: Retreives the user interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
-
PatternLanguage::getUserUI()
: Retreives the user interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
-
ContentGroupElement::getUserUI()
: Retreives the user interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
-
EmbeddedContent::getUserUI()
: Retreives the user interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
-
File::getUserUI()
: Retreives the user interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
-
Picture::getUserUI()
: Retreives the user interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
-
Avatar::getUserUI()
: Retrieves the user interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
-
FlickrPhotostream::getUserUI()
: Retreives the user interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
-
HTMLeditor::getUserUI()
: Retreives the user interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
-
IFrame::getUserUI()
: Retreives the user interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
-
Langstring::getUserUI()
: Retreives the user interface of this object. Anything that overrides this method should call the parent method with it's output at the END of processing.
-
RssAggregator::getUserUI()
: Retreives the user interface of this object.
Is this Content element displayable at this hotspot, many classer override this
true
isDisplayableAt
($node $node)
-
$node
$node: Node, optionnal
Redefined in descendants as:
Check if a user is one of the owners of the object
true
isOwner
($user $user)
-
$user
$user: User object: the user to be tested.
Redefined in descendants as:
Persistent (or read-only) content is meant for re-use. It will not be deleted when the delete() method is called. When a containing element (ContentGroup, ContentGroupElement) is deleted, it calls delete on all the content it includes. If the content is persistent, only the association will be removed.
true
isPersistent
()
Tell if a given user is already subscribed to this content
boolean
isUserSubscribed
(User $user)
-
User
$user: the given user
Log that this content has just been displayed to the user. Will only log if the user is logged in
void
logContentDisplay
()
Process admin interface of this object. When an object overrides this method, they should call the parent processAdminUI at the BEGINING of processing.
void
processAdminUI
()
Redefined in descendants as:
Process the new object interface.
Will return the new object if the user has the credentials necessary (Else an exception is thrown) and and the form was fully filled (Else the object returns null).
the
processCreateNewObjectUI
()
Get the created Content object, IF one was created
OR Get existing content ( depending on what the user clicked )
the
processLinkedContentUI
($user_prefix $user_prefix, $associate_existing_content $link_table, mixed $link_table_obj_key_col, mixed $link_table_obj_key)
-
$user_prefix
$user_prefix: A identifier provided by the programmer to recognise it's generated form
-
$associate_existing_content
$link_table: boolean if true allows to get existing object
Get the created Content object, IF one was created
OR Get existing content ( depending on what the user clicked )
the
processNewContentUI
($user_prefix $user_prefix, [$associate_existing_content $associate_existing_content = false])
-
$user_prefix
$user_prefix: A identifier provided by the programmer to recognise it's generated form
-
$associate_existing_content
$associate_existing_content: boolean if true allows to get existing object
Redefined in descendants as:
Get the selected Content object.
the
processSelectContentUI
($user_prefix $user_prefix)
-
$user_prefix
$user_prefix: A identifier provided by the programmer to recognise it's generated form
Reloads the object from the database. Should normally be called after a set operation.
This function is private because calling it from a subclass will call the constructor from the wrong scope
void
refresh
()
Redefined in descendants as:
-
ContentGroup::refresh()
: Reloads the object from the database. Should normally be called after a set operation.
-
PatternLanguage::refresh()
: Reloads the object from the database. Should normally be called after a set operation.
-
EmbeddedContent::refresh()
: Reloads the object from the database. Should normally be called after a set operation.
-
File::refresh()
: Reloads the object from the database. Should normally be called after a set operation.
-
Picture::refresh()
: Reloads the object from the database. Should normally be called after a set operation.
-
Avatar::refresh()
: Reloads the object from the database. Should normally be called after a set operation.
-
FlickrPhotostream::refresh()
: Reloads the object from the database. Should normally be called after a set operation.
-
HTMLeditor::refresh()
: Reloads the object from the database. Should normally be called after a set operation. This function is private because calling it from a subclass will call the constructor from the wrong scope.
-
IFrame::refresh()
: Reloads the object from the database. Should normally be called after a set operation.
-
IFrameRest::refresh()
: Reloads the object from the database. Should normally be called after a set operation.
-
SimpleIFrame::refresh()
: Reloads the object from the database. Should normally be called after a set operation.
-
Langstring::refresh()
: Reloads the object from the database. Should normally be called after a set operation.
-
TrivialLangstring::refresh()
: Reloads the object from the database. Should normally be called after a set operation.
-
RssAggregator::refresh()
: Reloads the object from the database. Should normally be called after a set operation.
Set the object type of this object
Note that after using this, the object must be re-instanciated to have the right type
void
setContentType
(mixed $content_type)
Set if the content group is persistent
void
setIsPersistent
($is_locative_content $is_persistent)
-
$is_locative_content
$is_persistent: true or false
When a content object is set as trivial, it means that is is used merely to contain it's own data. No title, description or other data will be set or displayed, during display or administration
void
setIsTrivialContent
($is_trivial $is_trivial)
-
$is_trivial
$is_trivial: true or false
Sets display logging status
void
setLoggingStatus
(mixed $status)
Subscribe to the project
true
subscribe
(User $user)
Unsubscribe to the project
true
unsubscribe
(User $user)
A short string representation of the content
void
__toString
()
Redefined in descendants as: