if (($ids =
$this->
Request()->
getParam('id'
)) !== null
) { $result =
[];
if (\
is_string($ids)) { $ids =
explode(', ',
$ids);
} foreach ($ids as $id) { $result[] =
$this->
getRepository()->
getPathById($id, 'name',
$separator);
} } else { $query =
$this->
Request()->
getParam('query'
);
$parents =
(bool) $this->
Request()->
getParam('parents', true
);
$result =
$this->
getPathByQuery($query,
$separator,
$parents);
} $data =
[];
if ($this->
Request()->
getParam('includeRoot', false
)) { $data[] =
['id' => 1, 'name' => 'Shopware'
];
} foreach ($result as $id =>
$name) { $data[] =
['id' =>
$id, 'name' =>
$name];
}