| 1 |
<?php |
| 2 |
/** |
| 3 |
* Single-import module (spec 020-single-template-import). |
| 4 |
* |
| 5 |
* Single-template import across platforms: the in-editor insert endpoint, library |
| 6 |
* import, dashboard-initiated page creation, and the plugin/theme dependency |
| 7 |
* check+install surface. Relocated from includes/API/ — behavior byte-identical |
| 8 |
* (same routes, params). Dependencies.php was assigned here by the modularization |
| 9 |
* PRD's ownership ruling (overriding spec 017's metadata-endpoints listing). |
| 10 |
* |
| 11 |
* @package Templately |
| 12 |
*/ |
| 13 |
|
| 14 |
namespace Templately\Modules\SingleImport; |
| 15 |
|
| 16 |
use Templately\Core\Module_Base; |
| 17 |
use Templately\Modules\SingleImport\REST\Dependencies; |
| 18 |
use Templately\Modules\SingleImport\REST\Import; |
| 19 |
|
| 20 |
class Module extends Module_Base { |
| 21 |
|
| 22 |
public function get_name(): string { |
| 23 |
return 'single-import'; |
| 24 |
} |
| 25 |
|
| 26 |
public function get_dependencies(): array { |
| 27 |
// REST/Import.php calls full-site-import's Utils::add_gd_editor_filter() during |
| 28 |
// import (spec 025). (The elementor-/gutenberg-integration references stay |
| 29 |
// baselined — they are docblock-only @method type hints; the driver is resolved |
| 30 |
// through the Module string-ID locator, not the class reference.) |
| 31 |
// `pro-plugin-provisioning` (spec 059) is deliberately NOT listed: the only |
| 32 |
// reach is a build-time TypeScript import of its catalog twin, and declaring |
| 33 |
// it would make Modules_Manager skip THIS module whenever that one is inactive. |
| 34 |
// Baselined as an intentional reach-in instead. |
| 35 |
return [ 'full-site-import' ]; |
| 36 |
} |
| 37 |
|
| 38 |
public function register_rest_routes(): void { |
| 39 |
Import::get_instance()->register_routes(); |
| 40 |
Dependencies::get_instance()->register_routes(); |
| 41 |
} |
| 42 |
} |
| 43 |
|