/** * Creates a new bookmark * @param $type * @param $object_id the object who owns the bookmark * @param $owner if not set, owner will be current user * @return bookmark id */ public static function create($type, $object_id, $owner = 0) { $session = SessionHandler::getInstance(); $o = new Bookmark(); $o->type = $type; $o->value = $object_id; $o->owner = $owner ? $owner : $session->id; return $o->store(); }