| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template-recommendations module (spec 019-template-recommendations). |
| 4 |
* |
| 5 |
* FRONTEND-ONLY: its Ownership section is explicit that all three REST endpoints |
| 6 |
* consumed here (related-items, featured-items, trending-items) are registered by |
| 7 |
* modules/template-browsing (spec 017) in REST/Items.php — this module MUST NOT ship |
| 8 |
* REST controller classes of its own. register_rest_routes() is intentionally a no-op. |
| 9 |
* |
| 10 |
* @package Templately |
| 11 |
*/ |
| 12 |
|
| 13 |
namespace Templately\Modules\TemplateRecommendations; |
| 14 |
|
| 15 |
use Templately\Core\Module_Base; |
| 16 |
|
| 17 |
class Module extends Module_Base { |
| 18 |
|
| 19 |
public function get_name(): string { |
| 20 |
return 'template-recommendations'; |
| 21 |
} |
| 22 |
|
| 23 |
public function get_dependencies(): array { |
| 24 |
// CONTRACT deps, not import deps (the dependency scanner rightly finds no |
| 25 |
// code reference): template-browsing owns the three REST endpoints this |
| 26 |
// module's strips consume, and template-details renders the slot fills |
| 27 |
// this module registers. Both must be booted for this module to mean |
| 28 |
// anything — same pattern as template-browsing's own auth dep. |
| 29 |
return [ 'template-details', 'template-browsing' ]; |
| 30 |
} |
| 31 |
} |
| 32 |
|