mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
35 lines
1014 B
PHP
35 lines
1014 B
PHP
<?php
|
|
|
|
namespace Chill\ActivityBundle\Menu;
|
|
|
|
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
|
use Knp\Menu\MenuItem;
|
|
|
|
class AccompanyingCourseQuickMenuBuilder implements LocalMenuBuilderInterface
|
|
{
|
|
public static function getMenuIds(): array
|
|
{
|
|
return ['accompanying_course_quick_menu'];
|
|
}
|
|
|
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
|
{
|
|
/** @var \Chill\PersonBundle\Entity\AccompanyingPeriod $accompanyingCourse */
|
|
$accompanyingCourse = $parameters['accompanying-course'];
|
|
|
|
$menu
|
|
->addChild('Create a new activity in accompanying course', [
|
|
'route' => 'chill_activity_activity_new',
|
|
'routeParameters' => [
|
|
// 'activityType_id' => '',
|
|
'accompanying_period_id' => $accompanyingCourse->getId()
|
|
]
|
|
])
|
|
->setExtras([
|
|
'order' => 10,
|
|
'icon' => 'plus'
|
|
])
|
|
;
|
|
|
|
}
|
|
} |