-
-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
124 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,13 @@ public function get(GetAlbumRequest $request): AbstractAlbumResource | |
return new AbstractAlbumResource($config, $albumResource); | ||
} | ||
|
||
/** | ||
* Create an album. | ||
* | ||
* @param AddAlbumRequest $request | ||
* | ||
* @return string | ||
*/ | ||
public function createAlbum(AddAlbumRequest $request): string | ||
{ | ||
/** @var int $ownerId */ | ||
|
@@ -92,11 +99,25 @@ public function createAlbum(AddAlbumRequest $request): string | |
return $create->create($request->title(), $request->parent_album())->id; | ||
} | ||
|
||
/** | ||
* Create a tag album. | ||
* | ||
* @param AddAlbumRequest $request | ||
* | ||
* @return string | ||
*/ | ||
public function createTagAlbum(AddTagAlbumRequest $request, CreateTagAlbum $create): string | ||
Check failure on line 109 in app/Http/Controllers/Gallery/AlbumController.php GitHub Actions / 2️⃣ PHP 8.2 - PHPStan
Check failure on line 109 in app/Http/Controllers/Gallery/AlbumController.php GitHub Actions / 2️⃣ PHP 8.2 - PHPStan
|
||
{ | ||
return $create->create($request->title(), $request->tags())->id; | ||
} | ||
|
||
/** | ||
* Update the info of an Album. | ||
* | ||
* @param AddAlbumRequest $request | ||
* | ||
* @return EditableBaseAlbumResource | ||
*/ | ||
public function updateAlbum(UpdateAlbumRequest $request, SetHeader $setHeader): EditableBaseAlbumResource | ||
Check failure on line 121 in app/Http/Controllers/Gallery/AlbumController.php GitHub Actions / 2️⃣ PHP 8.2 - PHPStan
Check failure on line 121 in app/Http/Controllers/Gallery/AlbumController.php GitHub Actions / 2️⃣ PHP 8.2 - PHPStan
|
||
{ | ||
$album = $request->album(); | ||
|
@@ -124,6 +145,13 @@ public function updateAlbum(UpdateAlbumRequest $request, SetHeader $setHeader): | |
return EditableBaseAlbumResource::fromModel($album); | ||
} | ||
|
||
/** | ||
* Update the info of a Tag Album. | ||
* | ||
* @param UpdateTagAlbumRequest $request | ||
* | ||
* @return EditableBaseAlbumResource | ||
*/ | ||
public function updateTagAlbum(UpdateTagAlbumRequest $request): EditableBaseAlbumResource | ||
{ | ||
$album = $request->album(); | ||
|
@@ -142,6 +170,15 @@ public function updateTagAlbum(UpdateTagAlbumRequest $request): EditableBaseAlbu | |
return EditableBaseAlbumResource::fromModel($album); | ||
} | ||
|
||
/** | ||
* Update the protection policy of an Abstract Album. | ||
* | ||
* @param SetAlbumProtectionPolicyRequest $request | ||
* @param SetProtectionPolicy $setProtectionPolicy | ||
* @param SetSmartProtectionPolicy $setSmartProtectionPolicy | ||
* | ||
* @return AlbumProtectionPolicy | ||
*/ | ||
public function updateProtectionPolicy(SetAlbumProtectionPolicyRequest $request, | ||
SetProtectionPolicy $setProtectionPolicy, | ||
SetSmartProtectionPolicy $setSmartProtectionPolicy): AlbumProtectionPolicy | ||
|
@@ -224,6 +261,8 @@ public function move(MoveAlbumsRequest $request, Move $move): void | |
} | ||
|
||
/** | ||
* Transfer the ownership of the album to another user. | ||
* | ||
* @param TransferAlbumRequest $request | ||
* @param Transfer $transfer | ||
* | ||
|
@@ -235,6 +274,8 @@ public function transfer(TransferAlbumRequest $request, Transfer $transfer): voi | |
} | ||
|
||
/** | ||
* Set the album cover (the square thumb). | ||
* | ||
* @param SetAsCoverRequest $request | ||
* | ||
* @return void | ||
|
@@ -247,6 +288,8 @@ public function cover(SetAsCoverRequest $request): void | |
} | ||
|
||
/** | ||
* Set the album header (the hero banner). | ||
* | ||
* @param $request | ||
* | ||
* @return void | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters