| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template-customizer module (spec 021-template-customizer + 024-logo-branding). |
| 4 |
* |
| 5 |
* PHP REST surface: AI logo generation (generate/callback/data/poll/available-credits). |
| 6 |
* Relocated from includes/API/LogoGeneration.php — behavior byte-identical (same routes, |
| 7 |
* params, option keys). The consolidation decision assigns 024's logo REST here. |
| 8 |
* |
| 9 |
* The JS view layer this spec describes (Customizer wizard, color/typography editors, |
| 10 |
* logo generator UI, AI tagline UI) is DEFERRED: that code currently lives inside |
| 11 |
* react-src/app/components/fsi/{wizard,customizer}/ (spec 029's future territory), |
| 12 |
* tightly coupled to the FSI wizard's step machine (fsiFlowReducer, aiMode, SurfaceShell). |
| 13 |
* Extracting it now would mean restructuring FSI's wizard before 029's own pass — see the |
| 14 |
* modularization PRD's blockers log for the full reasoning. Complete the JS move when |
| 15 |
* spec 029 (or a dedicated follow-up after it) is reached. |
| 16 |
* |
| 17 |
* @package Templately |
| 18 |
*/ |
| 19 |
|
| 20 |
namespace Templately\Modules\TemplateCustomizer; |
| 21 |
|
| 22 |
use Templately\Core\Module_Base; |
| 23 |
use Templately\Modules\TemplateCustomizer\REST\LogoGeneration; |
| 24 |
|
| 25 |
class Module extends Module_Base { |
| 26 |
|
| 27 |
public function get_name(): string { |
| 28 |
return 'template-customizer'; |
| 29 |
} |
| 30 |
|
| 31 |
public function get_dependencies(): array { |
| 32 |
// REST/LogoGeneration.php uses full-site-import's Utils/AIUtils/SignatureVerifier |
| 33 |
// during AI logo generation (spec 025). |
| 34 |
return [ 'full-site-import' ]; |
| 35 |
} |
| 36 |
|
| 37 |
public function register_rest_routes(): void { |
| 38 |
LogoGeneration::get_instance()->register_routes(); |
| 39 |
} |
| 40 |
} |
| 41 |
|