Created
October 9, 2021 11:50
-
-
Save akroii/b803f8691d3919cfd3f1f5da0703714d to your computer and use it in GitHub Desktop.
get cssclass from maeeventcategories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$categoriesModel = MaeEventCatModel::findAll(); | |
$information = array(); | |
$chunks = deserialize($this->categories); | |
foreach ($chunks as $chunk) { | |
if (array_key_exists($chunk, $information)) { | |
continue; | |
} | |
if ($categoriesModel) { | |
while ($categoriesModel->next()) { | |
if ($categoriesModel->id != $chunk) { | |
continue; | |
} | |
echo $information[$chunk] = $categoriesModel->cssClass; | |
} | |
$categoriesModel->reset(); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment