public function getUnassignedItems()
{
$data = [];
$items = $this->manager->getItems(null, $this->item !== null ? [$this->item->name] : []);
if ($this->item === null) {
foreach ($items as $item) {
$data[$item->name] = $this->formatName($item);
}
} else {
foreach ($items as $item) {
if ($this->manager->canAddChild($this->item, $item)) {
$data[$item->name] = $this->formatName($item);
}
}
}
return $data;
}