PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / trunk
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! vtrunk
3.8.0 3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 All 112 releases
templately / modules / profile-collections / module.php

module.php in Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! trunk, at modules/profile-collections/module.php

45 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Profile-collections module (spec 029-profile-collections).
4 *
5 * Favourites/downloads/purchased-items listing pages. Relocated verbatim from
6 * includes/API/Profile.php — behavior byte-identical (same 3 routes: download-
7 * history, my-favourites, purchased-items). NOT the same class as
8 * modules/auth/REST/Profile.php (profile/sync, profile/verified — a genuinely
9 * different, pre-existing class; a stale includes/Core/Migrator.php reference
10 * to the WRONG "Profile" class, calling ::sync() on THIS class where it never
11 * existed, was fixed as part of this move — see the PRD's blockers log).
12 *
13 * SCOPE NOTE: the favourite TOGGLE endpoint (POST /items/favourite) stays in
14 * modules/template-browsing/REST/Items.php (spec 017's own established
15 * boundary — not moved). The favourites/downloads/purchasedItems REDUX state,
16 * action creators, and sagas all live in modules/auth (profileReducer.js /
17 * actions.js / profileSaga.js, spec 013) — too entangled with the rest of
18 * profileReducer to split out, so this module owns only the REST + the view
19 * components, cross-referencing auth's state/actions/sagas as-is. No
20 * templately.routes registration and no webpack partial for the same reason
21 * 028-my-cloud deferred its own: the /downloads, /favourites, /purchased-items
22 * routes share one CloudsLayout parent wrapper with 028's /clouds route (also
23 * CloudsLayout-wrapped) — TemplatelyRoutes.js keeps its inline route
24 * definitions, importing Downloads/Favourites/PurchasedItems from this module
25 * via the profile/ barrel's re-export.
26 *
27 * @package Templately
28 */
29
30 namespace Templately\Modules\ProfileCollections;
31
32 use Templately\Core\Module_Base;
33 use Templately\Modules\ProfileCollections\REST\Profile;
34
35 class Module extends Module_Base {
36
37 public function get_name(): string {
38 return 'profile-collections';
39 }
40
41 public function register_rest_routes(): void {
42 Profile::get_instance()->register_routes();
43 }
44 }
45