File modules/cms/action/profile/ProfileBookmarkAction.class.php

Last commit: Sun Dec 8 20:56:47 2024 +0100	Jan Dankert	New: Users are now able to store bookmarks.
1 <?php 2 namespace cms\action\profile; 3 use cms\action\Method; 4 use cms\action\ProfileAction; 5 use cms\model\BaseObject; 6 use cms\model\Bookmark; 7 8 class ProfileBookmarkAction extends ProfileAction implements Method { 9 public function view() { 10 11 $bookmarkedObjects = array_map( function( $objectId ) { 12 // Map the objectid to the object properties 13 $o = new BaseObject( $objectId ); 14 $o->load(); 15 return $o->getProperties(); 16 }, Bookmark::getBookmarkedObjectIdsForUser( $this->user->getId() ) ); 17 18 $this->setTemplateVar( 'bookmarks',$bookmarkedObjects ); 19 } 20 21 22 /** 23 * Nothing... 24 * 25 * @return void 26 */ 27 public function post() { 28 29 } 30 }
Download modules/cms/action/profile/ProfileBookmarkAction.class.php
History Sun, 8 Dec 2024 20:56:47 +0100 Jan Dankert New: Users are now able to store bookmarks.