WIP: Implement CRUD, improve menu configuration

This commit is contained in:
Björn Fromme
2023-09-27 17:50:42 +02:00
parent c55fd85314
commit c528156959
43 changed files with 2187 additions and 3475 deletions
@@ -0,0 +1,16 @@
<?php
namespace App\Controller\Admin\Application;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class IndexController extends AbstractController
{
#[Route('/admin/application', name: 'app_admin_application_index')]
public function index(): Response
{
return $this->render('admin/application/index.html.twig');
}
}
@@ -0,0 +1,16 @@
<?php
namespace App\Controller\Admin\Assignment;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class IndexController extends AbstractController
{
#[Route('/admin/assignment', name: 'app_admin_assignment_index')]
public function index(): Response
{
return $this->render('admin/assignment/index.html.twig');
}
}
@@ -0,0 +1,16 @@
<?php
namespace App\Controller\Admin\Document;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class IndexController extends AbstractController
{
#[Route('/admin/document', name: 'app_admin_document_index')]
public function index(): Response
{
return $this->render('admin/document/index.html.twig');
}
}
@@ -0,0 +1,47 @@
<?php
namespace App\Controller\Admin\System\Faq;
use App\Entity\Faq;
use App\Form\FaqType;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
class CreateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
) {
}
#[Route('/admin/system/faq/create', name: 'app_admin_system_faq_create')]
#[IsGranted('ROLE_ADMIN')]
public function index(Request $request): Response
{
$faq = new Faq();
$form = $this->createForm(FaqType::class, $faq);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$this->entityManager->persist($faq);
$this->entityManager->flush();
$this->addFlash('success', 'Der FAQ-Eintrag wurde angelegt');
$this->logger->info('Create faq', [
'faq' => $faq->getQuestion(),
]);
return $this->redirectToRoute('app_admin_system_faq_index');
}
return $this->render('admin/system/faq/create.html.twig', [
'form' => $form
]);
}
}
@@ -0,0 +1,35 @@
<?php
namespace App\Controller\Admin\System\Faq;
use App\Entity\Faq;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
) {
}
#[Route('/admin/system/faq/delete/{id}', name: 'app_admin_system_faq_delete', methods: ['POST'])]
#[IsGranted('ROLE_ADMIN')]
public function index(Faq $faq): Response
{
$this->entityManager->remove($faq);
$this->entityManager->flush();
$this->addFlash('success', 'Der FAQ-Eintrag wurde gelöscht');
$this->logger->info('Delete faq', [
'faq' => $faq->getQuestion(),
]);
return $this->redirectToRoute('app_admin_system_faq_index');
}
}
@@ -0,0 +1,45 @@
<?php
namespace App\Controller\Admin\System\Faq;
use App\Entity\Faq;
use App\Form\FaqType;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
) {
}
#[Route('/admin/system/faq/edit/{id}', name: 'app_admin_system_faq_edit')]
#[IsGranted('ROLE_ADMIN')]
public function index(Faq $faq, Request $request): Response
{
$form = $this->createForm(FaqType::class, $faq);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$this->entityManager->flush();
$this->addFlash('success', 'Der FAQ-Eintrag wurde aktualisiert');
$this->logger->info('Edit faq', [
'faq' => $faq->getQuestion(),
]);
return $this->redirectToRoute('app_admin_system_faq_index');
}
return $this->render('admin/system/faq/edit.html.twig', [
'form' => $form
]);
}
}
@@ -0,0 +1,54 @@
<?php
namespace App\Controller\Admin\System\Faq;
use App\Entity\Faq;
use App\Repository\FaqRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
class IndexController extends AbstractController
{
public function __construct(
private readonly FaqRepository $faqRepository,
private readonly EntityManagerInterface $entityManager
) {
}
#[Route('/admin/system/faq', name: 'app_admin_system_faq_index')]
#[IsGranted('ROLE_ADMIN')]
public function index(): Response
{
$faqs = $this->faqRepository->findBy([], ['sorting' => 'ASC']);
return $this->render('admin/system/faq/index.html.twig', [
'faqs' => $faqs,
]);
}
#[Route('/admin/system/faq/sort', name: 'app_admin_system_faq_sort', methods: ['POST'])]
public function sort(Request $request): JsonResponse
{
$data = json_decode($request->getContent(), true);
$ordering = $data['ordering'];
$faqIds = array_keys($ordering);
$faqs = $this
->faqRepository
->findBy(['id' => $faqIds])
;
foreach ($faqs as $faq) {
/* @var Faq $faq */
$faq->setSorting($ordering[$faq->getId()]);
}
$this->entityManager->flush();
return $this->json([
'success' => true,
]);
}
}
@@ -32,7 +32,7 @@ class EditController extends AbstractController
$this->entityManager->flush();
$this->addFlash('success', 'Das Honorar wurde aktualisiert');
$this->logger->info('Update fee', [
$this->logger->info('Edit fee', [
'fee' => $fee->getName(),
]);
@@ -0,0 +1,35 @@
<?php
namespace App\Controller\Admin\System\JobProfile;
use App\Entity\JobProfile;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
) {
}
#[Route('/admin/system/job-profile/delete/{id}', name: 'app_admin_system_job_profile_delete', methods: ['POST'])]
#[IsGranted('ROLE_ADMIN')]
public function index(JobProfile $jobProfile): Response
{
$this->entityManager->remove($jobProfile);
$this->entityManager->flush();
$this->addFlash('success', 'Das Job-Profil wurde gelöscht');
$this->logger->info('Delete job-profile', [
'job_profile' => $jobProfile->getName(),
]);
return $this->redirectToRoute('app_admin_system_job_profile_index');
}
}
@@ -0,0 +1,45 @@
<?php
namespace App\Controller\Admin\System\JobProfile;
use App\Entity\JobProfile;
use App\Form\JobProfileType;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
) {
}
#[Route('/admin/system/job-profile/edit/{id}', name: 'app_admin_system_job_profile_edit')]
#[IsGranted('ROLE_ADMIN')]
public function index(JobProfile $jobProfile, Request $request): Response
{
$form = $this->createForm(JobProfileType::class, $jobProfile);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$this->entityManager->flush();
$this->addFlash('success', 'Das Job-Profil wurde aktualisiert');
$this->logger->info('Edit Job profile', [
'job_profile' => $jobProfile->getName(),
]);
return $this->redirectToRoute('app_admin_system_job_profile_index');
}
return $this->render('admin/system/job_profile/edit.html.twig', [
'form' => $form
]);
}
}
@@ -0,0 +1,35 @@
<?php
namespace App\Controller\Admin\System\Training;
use App\Entity\Training;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
) {
}
#[Route('/admin/system/training/delete/{id}', name: 'app_admin_system_training_delete', methods: ['POST'])]
#[IsGranted('ROLE_ADMIN')]
public function index(Training $training): Response
{
$this->entityManager->remove($training);
$this->entityManager->flush();
$this->addFlash('success', 'Die Fortbildung wurde gelöscht');
$this->logger->info('Delete training', [
'training' => $training->getName(),
]);
return $this->redirectToRoute('app_admin_system_training_index');
}
}
@@ -31,7 +31,7 @@ class EditController extends AbstractController
$this->entityManager->flush();
$this->addFlash('success', 'Die Fortbildung wurde aktualisiert');
$this->logger->info('Update training', [
$this->logger->info('Edit training', [
'training' => $training->getName(),
]);
@@ -0,0 +1,19 @@
<?php
namespace App\Controller\Common\Assignment;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
class CreateController extends AbstractController
{
#[Route('/assignment/create', name: 'app_common_assignment_create')]
#[IsGranted('ROLE_ADMINISTRATIVE')]
public function index(Request $request): Response
{
}
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Controller\Teamer;
use App\Repository\FaqRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
class FaqController extends AbstractController
{
public function __construct(private readonly FaqRepository $faqRepository)
{}
#[Route('/teamer/faq', name: 'app_teamer_faq')]
#[IsGranted('ROLE_USER')]
public function index(): Response
{
$faqs = $this->faqRepository->findBy([], ['sorting' => 'ASC']);
return $this->render('teamer/faq.html.twig', [
'faqs' => $faqs,
]);
}
}
+2 -2
View File
@@ -26,7 +26,7 @@ class Faq implements BlameableEntityInterface, TimestampableEntityInterface
private ?string $answer = null;
#[ORM\Column]
private ?int $sorting = null;
private int $sorting = 0;
public function getId(): ?int
{
@@ -57,7 +57,7 @@ class Faq implements BlameableEntityInterface, TimestampableEntityInterface
return $this;
}
public function getSorting(): ?int
public function getSorting(): int
{
return $this->sorting;
}
+4
View File
@@ -94,6 +94,10 @@ class User implements UserInterface, TimestampableEntityInterface
{
$roles = ['ROLE_USER', ...$this->roles];
if (in_array('ROLE_ADMIN', $this->roles) || in_array('ROLE_MANAGER', $this->roles)) {
$roles[] = 'ROLE_ADMINISTRATIVE';
}
return array_unique($roles);
}
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace App\Form;
use App\Entity\Faq;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class FaqType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('question', TextType::class, [
'label' => 'Frage',
])
->add('answer', TextareaType::class, [
'label' => 'Antwort',
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Faq::class,
]);
}
}
+54 -7
View File
@@ -25,6 +25,52 @@ abstract class AbstractMenuBuilder
return $this->factory->createItem('root');
}
protected function createMenu(array $menuItems): ItemInterface
{
$menu = $this->createRootElement();
foreach ($menuItems as $menuItem) {
$addedItem = $this->createMenuItem($menu, $menuItem);
if (isset($menuItem['hideChildren'])&& true === $menuItem['hideChildren']) {
$addedItem->setDisplayChildren(false);
}
if (isset($menuItem['children'])) {
foreach ($menuItem['children'] as $subMenuItem) {
$addedSubItem = $this->createMenuItem($addedItem, $subMenuItem);
if (isset($subMenuItem['children'])) {
$addedSubItem->setDisplayChildren(false);
foreach ($subMenuItem['children'] as $hiddenItem) {
$this->createMenuItem($addedSubItem, $hiddenItem);
}
}
}
}
}
return $menu;
}
protected function createMenuItem(ItemInterface $menu, array $options): ItemInterface
{
$itemOptions = [];
if (false !== $options['route']) {
$itemOptions['route'] = $options['route'];
$itemOptions['linkAttributes'] = ['title' => $options['title']];
}
if (isset($options['routeParameters'])) {
$itemOptions['routeParameters'] = $options['routeParameters'];
}
$addedItem = $menu
->addChild($options['title'], $itemOptions)
->setChildrenAttribute('title', $options['title'])
;
if (isset($options['icon'])) {
$addedItem->setExtra('icon', $options['icon']);
}
return $addedItem;
}
protected function getDefaultRouteParameters(string $parameter = 'id', string $default = '0'): array
{
return [$parameter => $this->requestStack->getMainRequest()->get($parameter, $default)];
@@ -74,18 +120,19 @@ abstract class AbstractMenuBuilder
->addChild('Logout', [
'route' => $originalUser->getDefaultRoute(),
'routeParameters' => ['_switch_user' => '_exit'],
])
->setLinkAttributes([
'title' => 'zurück',
'class' => 'icon-link',
'linkAttributes' => [
'title' => 'zurück',
],
])
->setExtra('icon', 'logout')
;
} else {
$menu
->addChild('Logout', ['route' => 'app_security_logout'])
->setLinkAttributes([
'title' => 'Logout',
->addChild('Logout', [
'route' => 'app_security_logout',
'linkAttributes' => [
'title' => 'Logout',
],
])
->setExtra('icon', 'logout')
;
+92 -89
View File
@@ -8,96 +8,99 @@ class AdminMenuBuilder extends AbstractMenuBuilder
{
public function createMainMenu(array $options): ItemInterface
{
$menu = $this->createRootElement();
$menu
->addChild('Dashboard', ['route' => 'app_admin_index'])
->setChildrenAttribute('title', 'Dashboard')
->setExtra('icon', 'lab')
;
$menu
->addChild('Einsatzübersicht', ['route' => 'app_admin_index'])
->setChildrenAttribute('title', 'Einsatzübersicht')
->setExtra('icon', 'calendar')
;
$menu
->addChild('Bewerbungsübersicht', ['route' => 'app_admin_index'])
->setChildrenAttribute('title', 'Bewerbungsübersicht')
->setExtra('icon', 'mail')
;
$menu
->addChild('Dokumentenübersicht', ['route' => 'app_admin_index'])
->setChildrenAttribute('title', 'Dokumentenübersicht')
->setExtra('icon', 'document')
;
$menu
->addChild('Teamerübersicht', ['route' => 'app_admin_teamer_index'])
->setChildrenAttribute('title', 'Teamerübersicht')
->setExtra('icon', 'users')
;
$systemMenu = $menu
->addChild('Einstellungen')
->setExtra('icon', 'settings')
;
$feeMenu = $systemMenu
->addChild('Honorare', [
'route' => 'app_admin_system_fee_index',
'linkAttributes' => [
'title' => 'Honorare',
$menuItems = [
[
'route' => 'app_admin_index',
'title' => 'Dashboard',
'icon' => 'lab',
],
[
'route' => 'app_admin_assignment_index',
'title' => 'Einsatzübersicht',
'icon' => 'calendar',
],
[
'route' => 'app_admin_application_index',
'title' => 'Bewerbungsübersicht',
'icon' => 'mail',
],
[
'route' => 'app_admin_document_index',
'title' => 'Dokumentenübersicht',
'icon' => 'document',
],
[
'route' => 'app_admin_teamer_index',
'title' => 'Teamerübersicht',
'icon' => 'users',
'hideChildren' => true,
'children' => [],
],
[
'route' => false,
'title' => 'Einstellungen',
'icon' => 'settings',
'children' => [
[
'route' => 'app_admin_system_fee_index',
'title' => 'Honorare',
'children' => [
[
'route' => 'app_admin_system_fee_create',
'title' => 'Honorar anlegen',
],
[
'route' => 'app_admin_system_fee_edit',
'routeParameters' => $this->getDefaultRouteParameters(),
'title' => 'Honorar bearbeiten',
],
],
],
[
'route' => 'app_admin_system_training_index',
'title' => 'Fortbildungen',
'children' => [
[
'route' => 'app_admin_system_training_create',
'title' => 'Fortbildung anlegen',
],
[
'route' => 'app_admin_system_training_edit',
'routeParameters' => $this->getDefaultRouteParameters(),
'title' => 'Fortbildung bearbeiten',
],
],
],
[
'route' => 'app_admin_system_job_profile_index',
'title' => 'Job-Profile',
'children' => [
[
'route' => 'app_admin_system_job_profile_create',
'title' => 'Job-Profil anlegen',
],
],
],
[
'route' => 'app_admin_system_faq_index',
'title' => 'FAQ',
'children' => [
[
'route' => 'app_admin_system_faq_create',
'title' => 'FAQ-Eintrag anlegen',
],
[
'route' => 'app_admin_system_faq_edit',
'routeParameters' => $this->getDefaultRouteParameters(),
'title' => 'FAQ-Eintrag bearbeiten',
],
],
],
],
'displayChildren' => false,
])
;
$feeMenu
->addChild('Honorar anlegen', [
'route' => 'app_admin_system_fee_create',
])
;
$feeMenu
->addChild('Honorar bearbeiten', [
'route' => 'app_admin_system_fee_edit',
'routeParameters' => $this->getDefaultRouteParameters(),
])
;
$trainingMenu = $systemMenu
->addChild('Fortbildungen', [
'route' => 'app_admin_system_training_index',
'linkAttributes' => [
'title' => 'Fortbildungen',
],
'displayChildren' => false,
])
;
$trainingMenu
->addChild('Fortbildung anlegen', [
'route' => 'app_admin_system_training_create',
])
;
$trainingMenu
->addChild('Fortbildung bearbeiten', [
'route' => 'app_admin_system_training_edit',
'routeParameters' => $this->getDefaultRouteParameters(),
])
;
$jobProfileMenu = $systemMenu
->addChild('Job-Profile', [
'route' => 'app_admin_system_job_profile_index',
'linkAttributes' => [
'title' => 'Fortbildungen',
],
'displayChildren' => false,
])
;
$jobProfileMenu
->addChild('Job-Profil anlegen', [
'route' => 'app_admin_system_job_profile_create',
])
;
],
];
$menu = $this->createMenu($menuItems);
$this->addDivider($menu);
+73 -66
View File
@@ -8,73 +8,80 @@ class TeamerMenuBuilder extends AbstractMenuBuilder
{
public function createMainMenu(array $options): ItemInterface
{
$menu = $this->createRootElement();
$menuItems = [
[
'route' => 'app_teamer_index',
'title' => 'Einsatzübersicht',
'icon' => 'calendar',
],
[
'route' => false,
'title' => 'Mein Profil',
'icon' => 'user',
'children' => [
[
'route' => 'app_teamer_profile_index',
'title' => 'Stammdaten und Foto',
],
[
'route' => 'app_teamer_profile_skills',
'title' => 'Jobprofile &amp; Skills',
],
[
'route' => 'app_teamer_profile_availabilities',
'title' => 'Meine Verfügbarkeit',
],
],
],
[
'route' => false,
'title' => 'Meine Einsätze',
'icon' => 'bus',
'children' => [
[
'route' => 'app_teamer_disposition_watchlist',
'title' => 'Merkliste',
],
[
'route' => 'app_teamer_disposition_watchlist',
'title' => 'Offene Bewerbungen',
],
[
'route' => 'app_teamer_disposition_watchlist',
'title' => 'Nächste Einsätze',
],
[
'route' => 'app_teamer_disposition_watchlist',
'title' => 'Letzte Einsätze',
],
[
'route' => 'app_teamer_disposition_watchlist',
'title' => 'Meine Dokumente',
],
[
'route' => 'app_teamer_disposition_watchlist',
'title' => 'Mein Feedback',
],
],
],
[
'route' => false,
'title' => 'FAQ &amp; Kontakt',
'icon' => 'info',
'children' => [
[
'route' => 'app_teamer_faq',
'title' => 'FAQ',
],
[
'route' => 'app_teamer_disposition_watchlist',
'title' => 'Kontakt',
],
],
],
];
$menu
->addChild('Einsatzübersicht', ['route' => 'app_teamer_index'])
->setChildrenAttribute('title', 'Einsatzübersicht')
->setExtra('icon', 'calendar')
;
$profileMenu = $menu
->addChild('Mein Profil')
->setExtra('icon', 'user')
->setLinkAttribute('title', 'Mein Profil')
;
$profileMenu
->addChild('Stammdaten und Foto', ['route' => 'app_teamer_profile_index'])
->setLinkAttribute('title', 'Stammdaten und Foto')
;
$profileMenu
->addChild('Jobprofile & Skills', ['route' => 'app_teamer_profile_skills'])
->setLinkAttribute('title', 'Jobprofile & Skills')
;
$profileMenu
->addChild('Meine Verfügbarkeit', ['route' => 'app_teamer_profile_availabilities'])
->setLinkAttribute('title', 'Meine Verfügbarkeit')
;
$dispositionMenu = $menu
->addChild('Meine Einsätze')
->setExtra('icon', 'bus')
;
$dispositionMenu
->addChild('Merkliste', ['route' => 'app_teamer_disposition_watchlist'])
->setLinkAttribute('title', 'Merkliste')
;
$dispositionMenu
->addChild('Offene Bewerbungen', ['route' => 'app_teamer_disposition_watchlist'])
->setLinkAttribute('title', 'Offene Bewerbungen')
;
$dispositionMenu
->addChild('Nächste Einsätze', ['route' => 'app_teamer_disposition_watchlist'])
->setLinkAttribute('title', 'Nächste Einsätze')
;
$dispositionMenu
->addChild('Letzte Einsätze', ['route' => 'app_teamer_disposition_watchlist'])
->setLinkAttribute('title', 'Letzte Einsätze')
;
$dispositionMenu
->addChild('Meine Dokumente', ['route' => 'app_teamer_disposition_watchlist'])
->setLinkAttribute('title', 'Meine Dokumente')
;
$dispositionMenu
->addChild('Mein Feedback', ['route' => 'app_teamer_disposition_watchlist'])
->setLinkAttribute('title', 'Mein Feedback')
;
$faqMenu = $menu
->addChild('FAQ &amp; Kontakt')
->setExtra('icon', 'info')
;
$faqMenu
->addChild('FAQ', ['route' => 'app_teamer_disposition_watchlist'])
->setLinkAttribute('title', 'FAQ')
;
$faqMenu
->addChild('Kontakt', ['route' => 'app_teamer_disposition_watchlist'])
->setLinkAttribute('title', 'Kontakt')
;
$menu = $this->createMenu($menuItems);
$this->addDivider($menu);
-43
View File
@@ -20,47 +20,4 @@ class FaqRepository extends ServiceEntityRepository
{
parent::__construct($registry, Faq::class);
}
public function save(Faq $entity, bool $flush = false): void
{
$this->getEntityManager()->persist($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
public function remove(Faq $entity, bool $flush = false): void
{
$this->getEntityManager()->remove($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
// /**
// * @return Faq[] Returns an array of Faq objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('f')
// ->andWhere('f.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('f.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Faq
// {
// return $this->createQueryBuilder('f')
// ->andWhere('f.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}