/**
* Gets all category detail information by the category node
*/
public function getDetailAction() { $node =
$this->
Request()->
getParam('node', 1
);
if ($node !== null
) { $node =
is_numeric($node) ?
(int) $node : 1;
$filter[] =
['property' => 'c.parentId', 'value' =>
$node];
} /** @var Query<array<string, mixed>> $query */
$query =
$this->
getRepository()->
getBackendDetailQuery($node)->
getQuery();
$query->
setHydrationMode(AbstractQuery::HYDRATE_ARRAY
);
$paginator =
$this->
getModelManager()->
createPaginator($query);
$data =
iterator_to_array($paginator);
$data =
$data[0
];
$data['imagePath'
] =
$data['media'
]['id'
] ?? null;
$this->
View()->
assign(['success' => true, 'data' =>
$data]);
} /**
* Returns the whole category path by an category id
*/