Class GlobalContentOperations

Description

Class for doing html blob related functions. Many of the HtmlBlob object functions are just wrappers around these.

  • version: $Revision$
  • since: 0.6
  • license: GPL

Located in /class.globalcontentoperations.inc.php (line 40)


	
			
Method Summary
static void &get_instance ()
GlobalContentOperations __construct ()
array AuthorBlobs ( $userid)
boolean CheckAuthorship (integer $id, integer $user_id)
boolean CheckExistingHtmlBlobName (string $name, [integer $id = -1])
boolean CheckOwnership (integer $id, string $user_id)
void ClearAdditionalEditors (integer $id)
boolean DeleteHtmlBlobByID (integer $id)
boolean InsertAdditionalEditors (string $id, string $user_id)
int InsertHtmlBlob (mixed $htmlblob)
mixed &LoadHtmlBlobByID (string $id)
mixed &LoadHtmlBlobByName (string $name)
array LoadHtmlBlobs ()
boolean UpdateHtmlBlob (mixed $htmlblob)
Methods
static method get_instance (line 47)
  • access: public
static void &get_instance ()
Constructor __construct (line 45)
  • access: protected
GlobalContentOperations __construct ()
AuthorBlobs (line 63)

Prepares an array with the list of the global content blocks $userid is an author of or is authorized to edit.

  • return: List of ids of the found global content blocks
  • since: 0.11
array AuthorBlobs ( $userid)
  • $userid
CheckAuthorship (line 353)

Checks to see if the given user has permission to modify the given global content block. Both user and block are identified by id.

  • return: Returns true if the user is the permitted. False if they are not.
boolean CheckAuthorship (integer $id, integer $user_id)
  • integer $id: The global content block id to check
  • integer $user_id: The user id to check
CheckExistingHtmlBlobName (line 295)

Given a name, check to see if it already exists in the database. If the id is given, ignore it for purposes of updating an existing block.

  • return: Returns true if the name is used. False if it not.
boolean CheckExistingHtmlBlobName (string $name, [integer $id = -1])
  • string $name: The name to check
  • integer $id: The global content block to ignore. If not passed, all blocks will be checked.
CheckOwnership (line 328)

Checks to see if the given global content block's id is owned by the given user's id.

  • return: Returns true if the user is the owner. False if they are not.
boolean CheckOwnership (integer $id, string $user_id)
  • integer $id: The global content block id to check
  • string $user_id: The user id to check
ClearAdditionalEditors (line 365)

Clears the list of additional editors for the given content block id

void ClearAdditionalEditors (integer $id)
  • integer $id: The global content block id to clear
DeleteHtmlBlobByID (line 270)

Given a global content block's id, delete it from the database.

  • return: Returns true if successful, false if not.
boolean DeleteHtmlBlobByID (integer $id)
  • integer $id: The id of the block to delete
InsertAdditionalEditors (line 381)

Insert a user id into the additional editors list of the specified global content block

  • return: true if successful, false if not.
boolean InsertAdditionalEditors (string $id, string $user_id)
  • string $id: The id of the global content block
  • string $user_id: The id of the user to add to the list
InsertHtmlBlob (line 223)

Given a global content object, creates a new global content block in the database with its attributes.

  • return: Returns the id of the new object in the database. If failure, returns -1.
int InsertHtmlBlob (mixed $htmlblob)
  • mixed $htmlblob: The global content object to store.
LoadHtmlBlobByID (line 151)

Load a global content block by its database id

  • return: If found, the global content block. If none is found, returns false.
mixed &LoadHtmlBlobByID (string $id)
  • string $id: The id of the block to load
LoadHtmlBlobByName (line 181)

Loads a global content block by its name

  • return: If found, the global content block. If none is found, returns false.
mixed &LoadHtmlBlobByName (string $name)
  • string $name: The name of the global content block to load
LoadHtmlBlobs (line 120)

Loads all global content blocks from the database and returns them

  • return: The list of global content blocks
array LoadHtmlBlobs ()
UpdateHtmlBlob (line 247)

Given a global content object, updates that global content block in the database with its updated attributes.

  • return: Returns true if successful, false if not.
boolean UpdateHtmlBlob (mixed $htmlblob)
  • mixed $htmlblob: The global content object to store.

Documentation generated on Sun, 12 Aug 2012 08:38:29 -0600 by phpDocumentor 1.3.2