30 lines
819 B
PHP
30 lines
819 B
PHP
<?php
|
|
|
|
class stTaskSchedulerImportBackendComponents extends autoStTaskSchedulerImportBackendComponents
|
|
{
|
|
protected function addListMenuItems(array $items): array
|
|
{
|
|
$controller = $this->getController();
|
|
|
|
$imports = [];
|
|
|
|
foreach (stTaskSchedulerImportConfiguration::getAll() as $configuration)
|
|
{
|
|
if (!$configuration->getParent())
|
|
{
|
|
$imports[$configuration->getId()] = $configuration->getLabel();
|
|
}
|
|
}
|
|
|
|
asort($imports, SORT_NATURAL);
|
|
|
|
foreach ($imports as $id => $label)
|
|
{
|
|
$items[$controller->genUrl('@stTaskSchedulerImportBackend?action=importConfiguration&id='.$id)] = __('Import - %name%', [
|
|
'%name%' => $label
|
|
]);
|
|
}
|
|
|
|
return $items;
|
|
}
|
|
} |