You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
658 B
PHTML
25 lines
658 B
PHTML
7 years ago
|
<?php
|
||
|
|
||
|
namespace Controllers\Category;
|
||
|
|
||
|
use BusinessLogic\Category\CategoryRetriever;
|
||
|
|
||
|
class CategoryController {
|
||
7 years ago
|
function get($id) {
|
||
|
$categories = self::getAllCategories();
|
||
|
output($categories[$id]);
|
||
7 years ago
|
}
|
||
|
|
||
7 years ago
|
static function printAllCategories() {
|
||
|
output(self::getAllCategories());
|
||
|
}
|
||
|
|
||
|
private static function getAllCategories() {
|
||
7 years ago
|
global $hesk_settings, $applicationContext, $userContext;
|
||
7 years ago
|
|
||
7 years ago
|
/* @var $categoryRetriever CategoryRetriever */
|
||
|
$categoryRetriever = $applicationContext->get['CategoryRetriever'];
|
||
|
|
||
7 years ago
|
return $categoryRetriever->getAllCategories($hesk_settings, $userContext);
|
||
7 years ago
|
}
|
||
|
}
|