ILIAS
trunk Revision v11.0_alpha-1761-g6dbbfa7b760
|
Public Member Functions | |
__construct (protected ResourceBuilder $resource_builder, protected CollectionBuilder $collection_builder, protected RepositoryPreloader $preloader) | |
Manager constructor. More... | |
publish (ResourceIdentification $rid) | |
Publish a resource. More... | |
unpublish (ResourceIdentification $rid) | |
Unpublish a resource. More... | |
find (string $identification) | |
getResource (ResourceIdentification $i) | |
remove (ResourceIdentification $identification, ResourceStakeholder $stakeholder) | |
clone (ResourceIdentification $identification) | |
appendNewRevision (ResourceIdentification $identification, UploadResult $result, ResourceStakeholder $stakeholder, ?string $revision_title=null, bool $draft=false) | |
Append a new revision from an UploadResult. More... | |
replaceWithUpload (ResourceIdentification $identification, UploadResult $result, ResourceStakeholder $stakeholder, ?string $revision_title=null) | |
appendNewRevisionFromStream (ResourceIdentification $identification, FileStream $stream, ResourceStakeholder $stakeholder, ?string $revision_title=null, bool $draft=false) | |
Append a new revision from a stream. More... | |
replaceWithStream (ResourceIdentification $identification, FileStream $stream, ResourceStakeholder $stakeholder, ?string $revision_title=null) | |
getCurrentRevision (ResourceIdentification $identification) | |
getCurrentRevisionIncludingDraft (ResourceIdentification $identification) | |
updateRevision (Revision $revision) | |
rollbackRevision (ResourceIdentification $identification, int $revision_number) | |
removeRevision (ResourceIdentification $identification, int $revision_number) | |
Protected Member Functions | |
checkZIP (bool|string $mimetype) | |
newStreamBased (FileStream $stream, ResourceStakeholder $stakeholder, ResourceType $type, ?string $revision_title=null) | |
Definition at line 41 of file BaseManager.php.
ILIAS\ResourceStorage\Manager\BaseManager::__construct | ( | protected ResourceBuilder | $resource_builder, |
protected CollectionBuilder | $collection_builder, | ||
protected RepositoryPreloader | $preloader | ||
) |
ILIAS\ResourceStorage\Manager\BaseManager::appendNewRevision | ( | ResourceIdentification | $identification, |
UploadResult | $result, | ||
ResourceStakeholder | $stakeholder, | ||
?string | $revision_title = null , |
||
bool | $draft = false |
||
) |
Append a new revision from an UploadResult.
By passing $draft = true, the revision will be created as a DRAFT on top of the current revision. Consumers will always use the latest published revision. Appending new Revisions is not possible if the latest revision is already a DRAFT. In this case, the DRAFT will be updated.
Definition at line 146 of file BaseManager.php.
References ILIAS\ResourceStorage\Manager\BaseManager\checkZIP(), ILIAS\ResourceStorage\Resource\CONTAINER, ILIAS\ResourceStorage\Revision\DRAFT, ILIAS\FileUpload\DTO\UploadResult\getMimeType(), ILIAS\FileUpload\DTO\UploadResult\getName(), ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder\getOwnerOfNewResources(), ILIAS\FileUpload\DTO\UploadResult\getStatus(), ILIAS\FileUpload\DTO\UploadResult\isOK(), and ILIAS\ResourceStorage\Identification\AbstractIdentification\serialize().
ILIAS\ResourceStorage\Manager\BaseManager::appendNewRevisionFromStream | ( | ResourceIdentification | $identification, |
FileStream | $stream, | ||
ResourceStakeholder | $stakeholder, | ||
?string | $revision_title = null , |
||
bool | $draft = false |
||
) |
Append a new revision from a stream.
By passing $draft = true, the revision will be created as a DRAFT on top of the current revision. Consumers will always use the latest published revision. Appending new Revisions is not possible if the latest revision is already a DRAFT. In this case, the DRAFT will be updated.
Definition at line 239 of file BaseManager.php.
References ILIAS\ResourceStorage\Manager\BaseManager\checkZIP(), ILIAS\ResourceStorage\Resource\CONTAINER, ILIAS\ResourceStorage\Revision\DRAFT, ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder\getOwnerOfNewResources(), and ILIAS\ResourceStorage\Identification\AbstractIdentification\serialize().
|
protected |
bool | string | $mimetype |
Definition at line 54 of file BaseManager.php.
Referenced by ILIAS\ResourceStorage\Manager\BaseManager\appendNewRevision(), ILIAS\ResourceStorage\Manager\BaseManager\appendNewRevisionFromStream(), ILIAS\ResourceStorage\Manager\ContainerManager\containerFromStream(), ILIAS\ResourceStorage\Manager\ContainerManager\containerFromUpload(), ILIAS\ResourceStorage\Manager\BaseManager\replaceWithStream(), and ILIAS\ResourceStorage\Manager\BaseManager\replaceWithUpload().
ILIAS\ResourceStorage\Manager\BaseManager::clone | ( | ResourceIdentification | $identification | ) |
Definition at line 131 of file BaseManager.php.
ILIAS\ResourceStorage\Manager\BaseManager::find | ( | string | $identification | ) |
Definition at line 104 of file BaseManager.php.
References null.
ILIAS\ResourceStorage\Manager\BaseManager::getCurrentRevision | ( | ResourceIdentification | $identification | ) |
Definition at line 325 of file BaseManager.php.
ILIAS\ResourceStorage\Manager\BaseManager::getCurrentRevisionIncludingDraft | ( | ResourceIdentification | $identification | ) |
Definition at line 331 of file BaseManager.php.
ILIAS\ResourceStorage\Manager\BaseManager::getResource | ( | ResourceIdentification | $i | ) |
Definition at line 117 of file BaseManager.php.
References ILIAS\ResourceStorage\Identification\AbstractIdentification\serialize().
Referenced by ILIAS\ResourceStorage\Manager\ContainerManager\addStreamToContainer(), ILIAS\ResourceStorage\Manager\ContainerManager\addUploadToContainer(), ILIAS\ResourceStorage\Manager\ContainerManager\createDirectoryInsideContainer(), and ILIAS\ResourceStorage\Manager\ContainerManager\removePathInsideContainer().
|
protected |
Definition at line 79 of file BaseManager.php.
References ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder\getOwnerOfNewResources().
Referenced by ILIAS\ResourceStorage\Manager\ContainerManager\containerFromStream(), and ILIAS\ResourceStorage\Manager\Manager\stream().
ILIAS\ResourceStorage\Manager\BaseManager::publish | ( | ResourceIdentification | $rid | ) |
Publish a resource.
A resource can contain a maximum of one revision in DRAFT on top status. This method can be used to publish this revision. If the latest revision is already published, nothing changes.
Definition at line 65 of file BaseManager.php.
ILIAS\ResourceStorage\Manager\BaseManager::remove | ( | ResourceIdentification | $identification, |
ResourceStakeholder | $stakeholder | ||
) |
Definition at line 123 of file BaseManager.php.
ILIAS\ResourceStorage\Manager\BaseManager::removeRevision | ( | ResourceIdentification | $identification, |
int | $revision_number | ||
) |
Definition at line 353 of file BaseManager.php.
ILIAS\ResourceStorage\Manager\BaseManager::replaceWithStream | ( | ResourceIdentification | $identification, |
FileStream | $stream, | ||
ResourceStakeholder | $stakeholder, | ||
?string | $revision_title = null |
||
) |
FileNamePolicyException | if the filename is not allowed |
Definition at line 284 of file BaseManager.php.
References ILIAS\ResourceStorage\Manager\BaseManager\checkZIP(), ILIAS\ResourceStorage\Resource\CONTAINER, ILIAS\ResourceStorage\Revision\DRAFT, ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder\getOwnerOfNewResources(), and ILIAS\ResourceStorage\Identification\AbstractIdentification\serialize().
ILIAS\ResourceStorage\Manager\BaseManager::replaceWithUpload | ( | ResourceIdentification | $identification, |
UploadResult | $result, | ||
ResourceStakeholder | $stakeholder, | ||
?string | $revision_title = null |
||
) |
FileNamePolicyException | if the filename is not allowed |
Definition at line 192 of file BaseManager.php.
References ILIAS\ResourceStorage\Manager\BaseManager\checkZIP(), ILIAS\ResourceStorage\Resource\CONTAINER, ILIAS\ResourceStorage\Revision\DRAFT, ILIAS\FileUpload\DTO\UploadResult\getMimeType(), ILIAS\FileUpload\DTO\UploadResult\getName(), ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder\getOwnerOfNewResources(), ILIAS\FileUpload\DTO\UploadResult\getStatus(), ILIAS\FileUpload\DTO\UploadResult\isOK(), and ILIAS\ResourceStorage\Identification\AbstractIdentification\serialize().
ILIAS\ResourceStorage\Manager\BaseManager::rollbackRevision | ( | ResourceIdentification | $identification, |
int | $revision_number | ||
) |
Definition at line 344 of file BaseManager.php.
ILIAS\ResourceStorage\Manager\BaseManager::unpublish | ( | ResourceIdentification | $rid | ) |
Unpublish a resource.
The newest revision of a resource is set to the DRAFT status. If the latest revision is already in DRAFT, nothing changes.
Definition at line 74 of file BaseManager.php.
ILIAS\ResourceStorage\Manager\BaseManager::updateRevision | ( | Revision | $revision | ) |
Definition at line 337 of file BaseManager.php.