Generate pledge council index.

This commit is contained in:
Kim Taylor
2024-09-21 16:53:24 +10:00
parent 2e444113c8
commit 82f65a2050
3 changed files with 26 additions and 28 deletions

View File

@@ -22,7 +22,16 @@ $pledgeCandidates = array_filter($candidate_data, function ($candidate) {
$renderer = new SPLPageRenderer();
//print_r($pledgeCandidates);
$pageContent = $renderer->renderPledgePage($councilData, $candidateData, $mediaData);
$councils = [];
foreach ($pledgeCandidates as $key => $candidate) {
$councils[] = $candidate['Council'];
}
$councils = array_unique($councils);
asort($councils);
//print_r($councils);
$pageContent = $renderer->renderPledgePage($councils, $pledgeCandidates);
if ($pageContent === null) {
exit(2);