Skip to content

Commit

Permalink
Merge branch '7.0' into 7.1
Browse files Browse the repository at this point in the history
* 7.0:
  Prepare 6.4.2 release
  [LeadGenerationBundle] fixed route and type handling
  [TaggingBundle] fixed base route
  Fix node reorder
  • Loading branch information
acrobat committed Apr 20, 2024
2 parents c44c641 + 9c962ff commit d24931e
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,18 @@ public function canAdd()
{
return true;
}

/**
* @param string|null $suffix
*
* @return string
*/
public function getPathByConvention($suffix = null)
{
if (null === $suffix || $suffix === '') {
return 'kunstmaanleadgenerationbundle_admin_popup_abstractpopup';
}

return sprintf('kunstmaanleadgenerationbundle_admin_popup_abstractpopup_%s', $suffix);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ public function editAction(Request $request, $id): Response
#[Route(path: '/add', name: 'kunstmaanleadgenerationbundle_admin_popup_abstractpopup_add', methods: ['GET', 'POST'])]
public function addAction(Request $request): Response
{
$type = $request->query->get('type');
$type = $request->isMethod('post')
? $request->request->get('type')
: $request->query->get('type');

return parent::doAddAction($this->getAdminListConfigurator(), $type, $request);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public function detailAction(Request $request, $popup)
#[Route(path: '/{popup}/add', requirements: ['popup' => '\d+'], name: 'kunstmaanleadgenerationbundle_admin_rule_abstractrule_add', methods: ['GET', 'POST'])]
public function addAction(Request $request, $popup): Response
{
$type = $request->query->get('type');
$type = $request->isMethod('post')
? $request->request->get('type')
: $request->query->get('type');

return parent::doAddAction($this->getAdminListConfigurator($popup), $type, $request);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -639,11 +639,11 @@ public function addHomepageAction(Request $request): RedirectResponse
}

#[Route(path: '/reorder', name: 'KunstmaanNodeBundle_nodes_reorder', methods: ['POST'])]
public function reorderAction(Request $request): string
public function reorderAction(Request $request): Response
{
$this->init($request);
$nodes = [];
$nodeIds = $request->request->get('nodes');
$nodeIds = $request->request->all('nodes');
$changeParents = $request->request->get('parent');

foreach ($nodeIds as $id) {
Expand Down
14 changes: 14 additions & 0 deletions src/Kunstmaan/TaggingBundle/AdminList/TagAdminListConfigurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,18 @@ public function getEntityClass(): string
{
return Tag::class;
}

/**
* @param string|null $suffix
*
* @return string
*/
public function getPathByConvention($suffix = null)
{
if (null === $suffix || $suffix === '') {
return 'kunstmaantaggingbundle_admin_tag';
}

return sprintf('kunstmaantaggingbundle_admin_tag_%s', $suffix);
}
}

0 comments on commit d24931e

Please sign in to comment.