designtopack/public/site/templates/project.json.php

23 lines
747 B
PHP
Raw Permalink Normal View History

2024-09-17 17:21:43 +02:00
<?php
2025-01-23 12:23:14 +01:00
$project = [
'title' => $page->title()->value(),
'url' => $page->url(),
'modified' => $page->modified('Y-MM-d'),
'status' => $page->status(),
'logo' => $page->client()->isNotEmpty() && $page->client()->toPage()
2025-01-23 12:23:14 +01:00
? $page->client()->toPage()->logo()->toFile()->url()
: null,
2025-05-27 11:39:20 +02:00
'steps' => $page->getSteps(),
'designToLight' => $page->isDTLEnabled()->isTrue() ? processDTLProposals($page) : null,
'hasOptimizationRequest' => $page->hasOptimizationRequest()->isTrue(),
2025-02-19 09:38:01 +01:00
'notifications' => $page->notifications()->yaml(),
2025-01-23 12:23:14 +01:00
];
2024-10-28 15:33:52 +01:00
$pageData = array_merge($genericData, $project);
2024-09-17 17:21:43 +02:00
2024-10-28 15:33:52 +01:00
echo json_encode([
'page' => $pageData,
'user' => $userData,
2025-01-23 12:23:14 +01:00
]);