| 1 |
<?php |
| 2 |
/** |
| 3 |
* My-cloud module (spec 028-my-cloud). |
| 4 |
* |
| 5 |
* Personal cloud file storage: MyClouds.php (list/usage/upload/download/delete/ |
| 6 |
* copy-move) + SavedTemplates.php (local Elementor library listing/deletion). |
| 7 |
* Relocated verbatim from includes/API/ — behavior byte-identical (same routes, |
| 8 |
* params, permission logic). |
| 9 |
* |
| 10 |
* SCOPE NOTE: this spec's own Ownership section nests workspace routes |
| 11 |
* (clouds/workspace, clouds/workspace/:slug, clouds/shared-workspace, |
| 12 |
* clouds/shared-workspace/:slug) under the /clouds SPA subtree, but that |
| 13 |
* functionality (WorkSpaces.php REST, the WorkSpace* React components, the |
| 14 |
* workspace/sharedWorkspace/workspaceDetails redux slices) is owned by the |
| 15 |
* separate, not-yet-extracted spec 030-workspaces. Genuinely shared UI |
| 16 |
* (CloudsLayout, Actions, ViewButtons, ContextMenu, CloudFileName, CloudSidebar — |
| 17 |
* all consumed by 3+ specs including 029-profile-collections' favourites/downloads/ |
| 18 |
* purchased pages) intentionally stays in react-src/ for now rather than being |
| 19 |
* force-owned by this module; each stays cross-referenced. See this module's |
| 20 |
* assets/js/CLAUDE.md and data-model.md's "Module Home" section for the full |
| 21 |
* boundary reasoning. |
| 22 |
* |
| 23 |
* @package Templately |
| 24 |
*/ |
| 25 |
|
| 26 |
namespace Templately\Modules\MyCloud; |
| 27 |
|
| 28 |
use Templately\Core\Module_Base; |
| 29 |
use Templately\Modules\MyCloud\REST\MyClouds; |
| 30 |
use Templately\Modules\MyCloud\REST\SavedTemplates; |
| 31 |
|
| 32 |
class Module extends Module_Base { |
| 33 |
|
| 34 |
public function get_name(): string { |
| 35 |
return 'my-cloud'; |
| 36 |
} |
| 37 |
|
| 38 |
public function register_rest_routes(): void { |
| 39 |
MyClouds::get_instance()->register_routes(); |
| 40 |
SavedTemplates::get_instance()->register_routes(); |
| 41 |
} |
| 42 |
} |
| 43 |
|