Share¶
- This class provides the ability for apps to share their content between users.Apps must create a backend class that implements OCP\Share_Backend and register it with this class.It provides the following hooks:- post_shared
Source: lib/public/Share.php#51 Parent: OC\Share\Constants
Methods¶
- Get the item of item type shared with a given user by source
Source: Parameters: - $itemType (string)
- $itemSource (string)
- $user (string) User to whom the item was shared
- $owner (string) Owner of the share
Returns: array Return list of items with file_target, permissions and expiration
Since: 6.0.0 - parameter $owner was added in 8.0.0
Deprecated: 17.0.0
- Get the item of item type shared with the current user by source
Source: Parameters: - $itemType (string)
- $itemSource (string)
- $format (int) (optional) Format type must be defined by the backend
- $parameters (mixed)
- $includeCollections (bool)
Returns: array
Since: 5.0.0
Deprecated: 17.0.0
- Based on the given token the share information will be returned - password protected shares will be verified
Source: Parameters: - $token (string)
- $checkPasswordProtection (bool)
Returns: array | bool false will be returned in case the token is unknown or unauthorized
Since: 5.0.0 - parameter $checkPasswordProtection was added in 7.0.0
Deprecated: 17.0.0
- Get the shared items of item type owned by the current user
Source: Parameters: - $itemType (string)
- $format (int) (optional) Format type must be defined by the backend
- $parameters (mixed)
- $limit (int) Number of items to return (optional) Returns all by default
- $includeCollections (bool)
Returns: mixed Return depends on format
Since: 5.0.0
Deprecated: 17.0.0
- Get the shared item of item type owned by the current user
Source: Parameters: - $itemType (string)
- $itemSource (string)
- $format (int) (optional) Format type must be defined by the backend
- $parameters (mixed)
- $includeCollections (bool)
Returns: mixed Return depends on format
Since: 5.0.0
Deprecated: 17.0.0 Refactoring notes: * defacto $parameters and $format is always the default and therefore is removed in the subsequent call
- sent status if users got informed by mail about share
Source: Parameters: - $itemType (string)
- $itemSource (string)
- $shareType (int) SHARE_TYPE_USER, SHARE_TYPE_GROUP, or SHARE_TYPE_LINK
- $recipient (string) with whom was the item shared
- $status (bool)
Since: 6.0.0 - parameter $originIsSource was added in 8.0.0
Deprecated: 17.0.0