Class Content

Description

Implements interfaces:

Any type of content

Located in /classes/Content.php (line 50)


	
			
Direct descendents
Class Description
ContentGroup A generic content group
ContentGroupElement the elements of a ContentGroup
EmbeddedContent A generic embedded content container This object supports backward compatiblity fallback
File Représente un Langstring en particulier, ne créez pas un objet langstrings si vous n'en avez pas spécifiquement besoin
FlickrPhotostream A Flickr Photostreams wrapper
HTMLeditor FCKeditor implementation
IFrame An IFrame can integrate external HTML content from a given URL.
Langstring Représente un Langstring en particulier, ne créez pas un objet langstrings si vous n'en avez pas spécifiquement besoin
RssAggregator Interim code to display the RSS feed for a hotspot
Variable Summary
Method Summary
Content __construct (mixed $content_id)
true addOwner (User $user, [$is_author $is_author = false])
the createNewObject ([$content_type $content_type = 'Content'], [$id $id = null])
void delete (mixed &$errmsg)
void deleteOwner (User $user, [mixed $is_author = false])
string getAdminUI ([string $subclass_admin_interface = null])
void getAllContent ([mixed $content_type = ""])
null getAuthors ()
content getDescription ()
The getId ()
PHP getLastDisplayTimestamp ([$user $user = null], [$node $node = null])
html getLinkedContentUI ($user_prefix $user_prefix, $content_type $link_table, mixed $link_table_obj_key_col, mixed $link_table_obj_key, mixed $display_location)
The getListUI ([$subclass_admin_interface $subclass_list_interface = null])
content getLongDescription ()
html getNewContentUI ($user_prefix $user_prefix, [$content_type $content_type = null])
the getObject ($content_id $content_id)
content getProjectInfo ()
html getSelectContentUI ($user_prefix $user_prefix, [mixed $sql_additional_where = null])
content getSponsorInfo ()
content getTitle ()
The getUserUI ([$subclass_admin_interface $subclass_user_interface = null])
true isDisplayableAt ($node $node)
true isOwner ($user $user)
true isPersistent ()
boolean isUserSubscribed (User $user)
void processAdminUI ()
the processLinkedContentUI ($user_prefix $user_prefix, $associate_existing_content $link_table, mixed $link_table_obj_key_col, mixed $link_table_obj_key)
the processNewContentUI ($user_prefix $user_prefix, [$associate_existing_content $associate_existing_content = false])
the processSelectContentUI ($user_prefix $user_prefix)
void refresh ()
void setContentType (mixed $content_type)
void setIsPersistent ($is_locative_content $is_persistent)
void setIsTrivialContent ($is_trivial $is_trivial)
void setLoggingStatus (mixed $status)
true subscribe (User $user)
true unsubscribe (User $user)
void __toString ()
Variables
mixed $content_row (line 52)
  • access: protected
mixed $content_type (line 53)
  • access: private
mixed $id (line 51)
  • access: protected
mixed $is_logging_enabled (line 55)
  • access: private
mixed $is_trivial_content (line 54)
  • access: private
Methods
Constructor __construct (line 448)
  • access: private
Content __construct (mixed $content_id)

Redefined in descendants as:
addOwner (line 594)

Check if a user is one of the owners of the object

  • return: on success, false on failure
  • access: public
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
createNewObject (line 63)

Create a new Content object in the database

  • return: newly created Content object, or null if there was an error (an exception is also trown
  • static:
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
delete (line 1341)
void delete (mixed &$errmsg)

Redefined in descendants as:
deleteOwner (line 613)

Remove an owner of the content

  • access: public
void deleteOwner (User $user, [mixed $is_author = false])
  • $user $user: The user to be removed from the owners list
getAdminUI (line 871)

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.

  • return: The HTML fragment for this interface.
  • access: public
string getAdminUI ([string $subclass_admin_interface = null])
  • string $subclass_admin_interface: HTML content of the interface element of a children.

Redefined in descendants as:
getAllContent (line 195)

Get all content, can be restricted to a given content type

  • static:
  • access: public
void getAllContent ([mixed $content_type = ""])

Redefined in descendants as:
getAuthors (line 708)

Get the authors of the Content

  • return: or array of User objects
  • access: public
null getAuthors ()
getAvailableContentTypes (line 160)

Get the list of available content type on the system

  • return: array of class names
  • static:
  • access: public
an getAvailableContentTypes ()
getCreateNewObjectUI (line 97)

Get an interface to create a new object.

  • return: markup
  • static:
  • access: public
html getCreateNewObjectUI ()
getDescription (line 509)

Get content description

  • return: a content sub-class
  • access: public
content getDescription ()
getId (line 724)
  • return: id
  • access: public
  • see: GenricObject
The getId ()
getLastDisplayTimestamp (line 652)

Get the PHP timestamp of the last time this content was displayed

  • return: timestamp (seconds since UNIX epoch) if the content has been displayed before, an empty string otherwise.
  • access: public
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
getLinkedContentUI (line 294)

Get a flexible interface to manage content linked to a node, a network or anything else

  • return: markup
  • static:
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
getListUI (line 853)

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.

  • return: HTML fragment for this interface
  • access: public
The getListUI ([$subclass_admin_interface $subclass_list_interface = null])
  • $subclass_admin_interface $subclass_list_interface: Html content of the interface element of a children
getLoggingStatus (line 632)

Indicates display logging status

  • access: public
void getLoggingStatus ()
getLongDescription (line 525)

Get content long description

  • return: a content sub-class
  • access: public
content getLongDescription ()
getNewContentUI (line 217)

Get a flexible interface to generate new content objects

  • return: markup
  • static:
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
getObject (line 143)

Get the Content object, specific to it's content type

  • return: Content object, or null if there was an error (an exception is also thrown)
  • static:
the getObject ($content_id $content_id)
  • $content_id $content_id: The content id
getObjectType (line 484)

Get the true object type represented by this isntance

  • return: array of class names
  • access: public
an getObjectType ()
getProjectInfo (line 541)

Get content project info

  • return: a content sub-class
  • access: public
content getProjectInfo ()
getSelectContentUI (line 406)

Get an interface to pick content from all persistent content.

  • return: markup
  • static:
  • access: public
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
getSponsorInfo (line 557)

Get content sponsor info

  • return: a content sub-class
  • access: public
content getSponsorInfo ()
getTitle (line 493)

Get content title

  • return: a content sub-class
  • access: public
content getTitle ()
getUserUI (line 739)

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.

  • return: HTML fragment for this interface
  • access: public
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.
isDisplayableAt (line 681)

Is this Content element displayable at this hotspot, many classer override this

  • return: or false
  • access: public
true isDisplayableAt ($node $node)
  • $node $node: Node, optionnal

Redefined in descendants as:
isOwner (line 689)

Check if a user is one of the owners of the object

  • return: if the user is a owner, false if he isn't of the user is null
  • access: public
true isOwner ($user $user)
  • $user $user: User object: the user to be tested.

Redefined in descendants as:
isPersistent (line 1301)

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.

  • return: or false
  • access: public
true isPersistent ()
isUserSubscribed (line 1274)

Tell if a given user is already subscribed to this content

  • access: public
boolean isUserSubscribed (User $user)
  • User $user: the given user
logContentDisplay (line 821)

Log that this content has just been displayed to the user. Will only log if the user is logged in

  • access: private
void logContentDisplay ()
processAdminUI (line 1082)

Process admin interface of this object. When an object overrides this method, they should call the parent processAdminUI at the BEGINING of processing.

  • access: public
void processAdminUI ()

Redefined in descendants as:
processCreateNewObjectUI (line 126)

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).

  • return: node object or null if no new node was created.
  • static:
the processCreateNewObjectUI ()
processLinkedContentUI (line 351)

Get the created Content object, IF one was created

OR Get existing content ( depending on what the user clicked )

  • return: Content object, or null if the user didn't greate one
  • static:
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
processNewContentUI (line 265)

Get the created Content object, IF one was created

OR Get existing content ( depending on what the user clicked )

  • return: Content object, or null if the user didn't greate one
  • static:
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:
processSelectContentUI (line 439)

Get the selected Content object.

  • return: Content object
  • static:
the processSelectContentUI ($user_prefix $user_prefix)
  • $user_prefix $user_prefix: A identifier provided by the programmer to recognise it's generated form
refresh (line 1333)

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

  • access: private
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.
setContentType (line 572)

Set the object type of this object

Note that after using this, the object must be re-instanciated to have the right type

  • access: private
void setContentType (mixed $content_type)
setIsPersistent (line 1317)

Set if the content group is persistent

  • access: public
void setIsPersistent ($is_locative_content $is_persistent)
  • $is_locative_content $is_persistent: true or false
setIsTrivialContent (line 731)

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

  • access: public
void setIsTrivialContent ($is_trivial $is_trivial)
  • $is_trivial $is_trivial: true or false
setLoggingStatus (line 640)

Sets display logging status

  • access: public
void setLoggingStatus (mixed $status)
subscribe (line 1288)

Subscribe to the project

  • return: on success, false on failure
  • access: public
true subscribe (User $user)
unsubscribe (line 1294)

Unsubscribe to the project

  • return: on success, false on failure
  • access: public
true unsubscribe (User $user)
__toString (line 468)

A short string representation of the content

  • access: public
void __toString ()

Redefined in descendants as:

Documentation generated on Mon, 26 Dec 2005 19:14:04 +0100 by phpDocumentor 1.3.0RC5