public function getParentOptions(Request
$request) { $available_menus =
[];
if ($menus =
$request->request->
all('menus'
)) { foreach ($menus as $menu) { $available_menus[$menu] =
$menu;
} } // @todo Update this to use the optional $cacheability parameter, so that
// a cacheable JSON response can be sent.
$options =
$this->menuParentSelector->
getParentSelectOptions('',
$available_menus);
return new JsonResponse($options);
} /**
* Route title callback.
*
* @param \Drupal\system\MenuInterface $menu
* The menu entity.
*
* @return array
* The menu label as a render array.
*/