public static function coreMenuItem() { return array_map(function ($type) { return ['label' => ContentType::getLabel($type), 'url' => ["/content/article-admin/index", 'type' => $type], 'items' => [['label' => ContentType::getLabel($type), 'url' => ["/content/article-admin/index", 'type' => $type], 'urlRule' => "admin/{$type}"], ['label' => 'Добавление', 'url' => ["/content/article-admin/update", 'type' => $type], 'urlRule' => "admin/{$type}/add"], ['label' => 'Редактирование', 'url' => ["/content/article-admin/update", 'type' => $type, 'uid' => MenuHelper::paramGet('uid')], 'urlRule' => "admin/{$type}/update/<uid>"]]]; }, ContentType::getKeys()); }
public static function coreMenuItem() { return array_map(function ($type) { return ['label' => ContentType::getLabel($type), 'url' => ["/content/article/index", 'type' => $type], 'urlRule' => $type, 'items' => [['label' => 'Просмотр', 'url' => ["/content/article/view", 'type' => $type, 'uid' => MenuHelper::paramGet('uid')], 'urlRule' => "{$type}/<uid>"]]]; }, ContentType::getKeys()); }