Checkpoint: headless JSON architecture documented + cleanup (Stufe 1+2)
Restore point before Stufe 3 (central resolver-service refactoring). Includes this session's work: - Success Story (usecase) rebuild: new fields/tabs, UsecaseSerializer, thin List/Show renderers, MM relations, inline content elements. - vitec_columns content block (two-column layout with per-item content) incl. unified header section; special-cased JSON resolution. - Container per-column flex (items[].config align/justify) + gap on parent. - Unified header section across CEs/plugins/containers; header fields in JSON. - ISO-style architecture spec: Documentation/Headless-JSON-Architecture.md. - Cleanup: removed local scratch + verified .bak backups. - Fixes: B-6 (undefined thumbnail variable in Downloadcardcollection image resolver), B-7 (unsatisfiable legacy CType OR branch in Downloadcard/Datasheets). Rollback: git reset --hard snapshot-2026-07-09-pre-stufe3 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
c6759186cb
commit
bb7c03235d
237 files changed
+6698
-1749
No files matched your search
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace Evomedien\Vitec\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
|
||||
/**
|
||||
* The repository for Event
|
||||
*/
|
||||
class EventRepository extends Repository
|
||||
{
|
||||
protected $defaultOrderings = [
|
||||
'eventstart' => QueryInterface::ORDER_ASCENDING,
|
||||
];
|
||||
|
||||
/**
|
||||
* All upcoming (or currently running) events, soonest first.
|
||||
* "Upcoming" = event end (or start, when no end is set) is today or later.
|
||||
*/
|
||||
public function findUpcoming(): QueryResultInterface
|
||||
{
|
||||
$todayMidnight = strtotime('today');
|
||||
|
||||
$query = $this->createQuery();
|
||||
$query->getQuerySettings()->setRespectStoragePage(false);
|
||||
$query->matching(
|
||||
$query->logicalAnd(
|
||||
$query->equals('hideonwebsite', 0),
|
||||
$query->logicalOr(
|
||||
$query->greaterThanOrEqual('eventend', $todayMidnight),
|
||||
$query->logicalAnd(
|
||||
$query->equals('eventend', 0),
|
||||
$query->greaterThanOrEqual('eventstart', $todayMidnight)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
return $query->execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Past events, most recent first.
|
||||
*/
|
||||
public function findPast(): QueryResultInterface
|
||||
{
|
||||
$todayMidnight = strtotime('today');
|
||||
|
||||
$query = $this->createQuery();
|
||||
$query->getQuerySettings()->setRespectStoragePage(false);
|
||||
$query->matching(
|
||||
$query->logicalAnd(
|
||||
$query->equals('hideonwebsite', 0),
|
||||
$query->logicalOr(
|
||||
$query->logicalAnd(
|
||||
$query->greaterThan('eventend', 0),
|
||||
$query->lessThan('eventend', $todayMidnight)
|
||||
),
|
||||
$query->logicalAnd(
|
||||
$query->equals('eventend', 0),
|
||||
$query->greaterThan('eventstart', 0),
|
||||
$query->lessThan('eventstart', $todayMidnight)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
$query->setOrderings(['eventstart' => QueryInterface::ORDER_DESCENDING]);
|
||||
return $query->execute();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user