本文整理匯總了PHP中eZ\Publish\API\Repository\ContentService::loadContentDrafts方法的典型用法代碼示例。如果您正苦於以下問題:PHP ContentService::loadContentDrafts方法的具體用法?PHP ContentService::loadContentDrafts怎麽用?PHP ContentService::loadContentDrafts使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZ\Publish\API\Repository\ContentService
的用法示例。
在下文中一共展示了ContentService::loadContentDrafts方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: loadContentDrafts
/**
* Loads drafts for a user.
*
* If no user is given the drafts for the authenticated user a returned
*
* @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the user is not allowed to load the draft list
*
* @param \eZ\Publish\API\Repository\Values\User\User $user
*
* @return \eZ\Publish\API\Repository\Values\Content\VersionInfo[] the drafts ({@link VersionInfo}) owned by the given user
*/
public function loadContentDrafts(User $user = null)
{
return $this->service->loadContentDrafts($user);
}
示例2: loadUserDrafts
/**
* Loads drafts assigned to user
*
* @param $userId
*
* @return \eZ\Publish\Core\REST\Server\Values\VersionList
*/
public function loadUserDrafts($userId)
{
$contentDrafts = $this->contentService->loadContentDrafts($this->userService->loadUser($userId));
return new Values\VersionList($contentDrafts, $this->request->getPathInfo());
}