| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 33 | function b_sitemap_xoopsfaq() |
||
| 34 | {
|
||
| 35 | /** @var Xoopsfaq\CategoryHandler $categoryHandler */ |
||
| 36 | /** @var Xoopsfaq\Helper $helper */ |
||
| 37 | $myts = \MyTextSanitizer::getInstance(); |
||
|
|
|||
| 38 | |||
| 39 | $moduleDirName = \basename(\dirname(__DIR__)); |
||
| 40 | $helper = Helper::getInstance(); |
||
| 41 | $categoryHandler = $helper->getHandler('Category');
|
||
| 42 | $catList = $categoryHandler->getList(); |
||
| 43 | |||
| 44 | $retVal = []; |
||
| 45 | foreach ($catList as $id => $title) {
|
||
| 46 | $retVal['parent'][] = [ |
||
| 47 | 'id' => $id, |
||
| 48 | 'title' => htmlspecialchars($title, ENT_QUOTES | ENT_HTML5), |
||
| 49 | 'url' => $helper->url('index.php?cat_id=' . $id),
|
||
| 50 | ]; |
||
| 51 | } |
||
| 52 | |||
| 53 | return $retVal; |
||
| 54 | } |
||
| 55 |