Свойство | Тип | Описание | |
---|---|---|---|
$_userId | integer | ||
$_userManager | Content_Users_Manager |
Метод | Описание | |
---|---|---|
__construct ( Content_Users_Manager $userManager ) | Constructor. | |
countBookmarks ( ) : integer | Returns the number of bookmarks. | |
getBookmark ( integer $id ) : Trean_Bookmark | Returns the bookmark corresponding to the given id. | |
getBookmarks ( array $ids, array $options = [] ) : array | Returns the bookmarks corresponding to the given ids. | |
groupBookmarks ( string $groupby ) : array | Return counts on grouping bookmarks by a specific property. | |
listBookmarks ( $sortby = 'title', integer $sortdir, integer $from, $count, string $userId = null ) : array | List bookmarks, sorted and paged as specified. | |
newBookmark ( array $properties, boolean $crawl = true ) : Trean_Bookmark | Create a new bookmark for the current user. | |
removeBookmark ( Trean_Bookmark $bookmark ) | Removes a Trean_Bookmark from the backend. | |
searchBookmarks ( string $q ) : array | Search bookmarks. |
Метод | Описание | |
---|---|---|
_resultSet ( array $bookmarks ) : array | Creates Trean_Bookmark objects for each row in a SQL result. |
public __construct ( Content_Users_Manager $userManager ) | ||
$userManager | Content_Users_Manager |
protected _resultSet ( array $bookmarks ) : array | ||
$bookmarks | array | An array of query results. |
Результат | array | An array of Trean_Bookmark objects. |
public countBookmarks ( ) : integer | ||
Результат | integer | The number of all bookmarks. |
public getBookmark ( integer $id ) : Trean_Bookmark | ||
$id | integer | The ID of the bookmark to retrieve. |
Результат | Trean_Bookmark | The bookmark object corresponding to the given name. |
public groupBookmarks ( string $groupby ) : array | ||
$groupby | string | The field to group on. (i.e., 'status'). |
Результат | array | A hash of results. |
public listBookmarks ( $sortby = 'title', integer $sortdir, integer $from, $count, string $userId = null ) : array | ||
$sortdir | integer | Direction of sort. |
$from | integer | Starting bookmark. |
$userId | string | List bookmarks for this userId. Defaults to $this->_userId. |
Результат | array | An array of Trean_Bookmark objects. |
public newBookmark ( array $properties, boolean $crawl = true ) : Trean_Bookmark | ||
$properties | array | The bookmark property array. |
$crawl | boolean | If true (default) attempt to crawl the URL. |
Результат | Trean_Bookmark |
public removeBookmark ( Trean_Bookmark $bookmark ) | ||
$bookmark | Trean_Bookmark | The bookmark to remove. |
public searchBookmarks ( string $q ) : array | ||
$q | string | The search text. |
Результат | array | An array of Trean_Bookmark objects that match the search. |