TagManager

class OC\TagManager
Source:lib/private/TagManager.php#48
Implements:OCP\ITagManager

Properties

Methods

public OC\TagManager::__construct($mapper, $userSession, $connection)
Source:lib/private/TagManager.php#59
public OC\TagManager::load($type, $defaultTags=[], $includeShared=false, $userId=null)
Create a new \OCP\ITags instance and load tags from db.
Source:

lib/private/TagManager.php#78

Parameters:
  • $type (string) The type identifier e.g. ‘contact’ or ‘event’.
  • $defaultTags (array) An array of default tags to be used if none are stored.
  • $includeShared (bool) Whether to include tags for items shared with this user by others.
  • $userId (string) user for which to retrieve the tags, defaults to the currently

logged in user

See:

\OCP\ITags

Returns:

\OCP\ITags since 20.0.0 $includeShared isn’t used anymore

public OC\TagManager::getUsersFavoritingObject($objectType, $objectId)
Get all users who favorited an object
Source:

lib/private/TagManager.php#97

Parameters:
  • $objectType (string)
  • $objectId (int)
Returns:

array