Skip to the content
Documentation

ezcontentbrowsebookmarkfolder

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

A virtual folder that organises the bookmarks of one user in a tree.

Description

A virtual folder that organises the bookmarks of one user in a tree.

A folder belongs to a user (user_id), sits in another folder (parent_id, 0 is the top level)
and has a name and a priority (ascending order within its parent). The depth is unlimited.
A bookmark sits in a folder through eZContentBrowseBookmark::folder_id (0 is the top level).
Everything that was written before folders existed keeps its meaning: a bookmark without a
folder is a top level bookmark and eZContentBrowseBookmark::fetchListForUser() still returns all
bookmarks of the user as one flat list.

\code $userID = eZUser::currentUserID(); $folder = eZContentBrowseBookmarkFolder::createNew( $userID, 'Projects' ); // top level $sub = eZContentBrowseBookmarkFolder::createNew( $userID, 'Press', $folder->attribute( 'id' ) ); eZContentBrowseBookmarkFolder::moveBookmark( $userID, $bookmarkID, $sub->

Persistent

Yes. Table expbookmark_folder.

Attributes

Attribute Type Static*
id integer Yes.
user_id integer Yes.
parent_id integer Yes.
name string Yes.
priority integer Yes.
created integer Yes.

* Yes: a field of the table (a stored value); No: a function attribute, computed when it is asked for.

Source

kernel/classes/ezcontentbrowsebookmarkfolder.php, eZContentBrowseBookmarkFolder::definition()

Added to the reference for Exponential 6.0.15: the 4.x reference had no page for this object.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.