BookmarkOperations View code

Class for doing bookmark related functions. Maybe of the Bookmark object functions are just wrappers around these.

package

CMS

license

GPL

Methods

LoadBookmarks(integer $user_id) : array

Gets a list of all bookmarks for a given user

Arguments

integer $user_id

The desired user id.

Response

array

An array of Bookmark objects

LoadBookmarkByID(integer $id) : \Bookmark

Loads a bookmark by bookmark_id.

Arguments

integer $id

bookmark_id to load

Response

\Bookmark

InsertBookmark(\Bookmark $bookmark) : integer

Saves a new bookmark to the database.

Arguments

\Bookmark $bookmark

Bookmark object to save

Response

integer

The new bookmark_id. If it fails, it returns -1.

UpdateBookmark(\Bookmark $bookmark) : boolean

Updates an existing bookmark in the database.

Arguments

\Bookmark $bookmark

object to save

Response

boolean

DeleteBookmarkByID(integer $id) : boolean

Deletes an existing bookmark from the database.

Arguments

integer $id

Id of the bookmark to delete

Response

boolean