Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/FOM/ManagerBundle/Configuration/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* This is a trivial subclass of the regular Symfony Route annotation
* All the magic with route prefixing happens in @see \FOM\ManagerBundle\Routing\AnnotatedRouteControllerLoader.
*
* @Annotation
* @author Christian Wygoda
*/
#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)]
Expand Down
8 changes: 4 additions & 4 deletions src/FOM/UserBundle/Controller/GroupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FOM\ManagerBundle\Configuration\Route;
use FOM\ManagerBundle\Configuration\Route as ManagerRoute;
use Symfony\Component\HttpFoundation\Response;

/**
Expand All @@ -32,7 +32,7 @@ public function __construct(
* @return Response
* @throws \Exception
*/
#[Route('/group/new', methods: ['GET', 'POST'])]
#[ManagerRoute('/group/new', methods: ['GET', 'POST'])]
public function create(Request $request)
{
$group = new Group();
Expand Down Expand Up @@ -70,7 +70,7 @@ public function create(Request $request)
* @param string $id
* @return Response
*/
#[Route('/group/{id}/edit', methods: ['GET', 'POST'])]
#[ManagerRoute('/group/{id}/edit', methods: ['GET', 'POST'])]
public function edit(Request $request, $id)
{
$this->denyAccessUnlessGranted(ResourceDomainInstallation::ACTION_EDIT_GROUPS);
Expand Down Expand Up @@ -123,7 +123,7 @@ public function edit(Request $request, $id)
* @param string $id
* @return Response
*/
#[Route('/group/{id}/delete', methods: ['POST'])]
#[ManagerRoute('/group/{id}/delete', methods: ['POST'])]
public function delete(Request $request, $id)
{
/** @var Group|null $group */
Expand Down
6 changes: 3 additions & 3 deletions src/FOM/UserBundle/Controller/PermissionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace FOM\UserBundle\Controller;

use FOM\ManagerBundle\Configuration\Route;
use FOM\ManagerBundle\Configuration\Route as ManagerRoute;
use FOM\UserBundle\Form\Type\PermissionListType;
use FOM\UserBundle\Security\Permission\AssignableSubject;
use FOM\UserBundle\Security\Permission\PermissionManager;
Expand All @@ -25,7 +25,7 @@ public function __construct(
* @param Request $request
* @return Response
*/
#[Route('/security/edit/{category}', methods: ['GET', 'POST'])]
#[ManagerRoute('/security/edit/{category}', methods: ['GET', 'POST'])]
public function edit(Request $request, string $category)
{
$this->denyAccessUnlessGranted(ResourceDomainInstallation::ACTION_MANAGE_PERMISSION);
Expand Down Expand Up @@ -69,7 +69,7 @@ public function edit(Request $request, string $category)
));
}

#[Route('/permission/overview', methods: ['GET'])]
#[ManagerRoute('/permission/overview', methods: ['GET'])]
public function overview(Request $request): Response
{
$assignableSubjects = $this->permissionManager->getAssignableSubjects();
Expand Down
2 changes: 0 additions & 2 deletions src/Mapbender/Component/Element/LegacyView.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
* Captures legacy (non-service, self-rendering) element frontend markup.
* Captured markup can have any structure, but will most likely contain outer Element
* tag with id, class and other misc attributes.
*
* @see \Mapbender\CoreBundle\Component\Element::render
*/
class LegacyView
{
Expand Down
20 changes: 0 additions & 20 deletions src/Mapbender/CoreBundle/Utils/ArrayUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,6 @@ public static function getValueFromArray(array $list, $value = null, $default =
}
}

/**
* Check if array has a key and return the value, other way set new one and return it.
*
* @deprecated THIS MODIFIES THE ARRAY BY WRITING THE KEY INTO THE KEY NOT THE VALUE YOU HAVE BEEN WARNED
* @internal
*
* @param array $arr
* @param string $key array key to check for existens
* @param null $value default value if key doesn't exists
* @return mixed new value
*/
public static function hasSet(array &$arr, $key, $value = null){
if(isset($arr[$key])){
return $arr[$key];
}else{
$arr[$key] = $key;
return $value;
}
}

/**
* Extract and return the value (or $default if missing) with given $key from given array.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function renderElements($elements)
$markupFragments = array();
foreach ($elements as $element) {
if (!$element instanceof Element) {
throw new \InvalidArgumentException("Unsupported type " . ($element && \is_object($element)) ? \get_class($element) : gettype($element));
throw new \InvalidArgumentException("Unsupported type " . (($element && \is_object($element)) ? \get_class($element) : gettype($element)));
}
$regionName = $element->getRegion();
if (!array_key_exists($regionName, $wrappers)) {
Expand Down Expand Up @@ -88,7 +88,7 @@ public function renderFloatingElements($elements)
$markup = '';
foreach ($elements as $element) {
if (!$element instanceof Element) {
throw new \InvalidArgumentException("Unsupported type " . ($element && \is_object($element)) ? \get_class($element) : gettype($element));
throw new \InvalidArgumentException("Unsupported type " . (($element && \is_object($element)) ? \get_class($element) : gettype($element)));
}
$content = $this->renderContent($element, 'div', array());
$markup .= $this->wrapTag($content, 'div', array(
Expand Down
15 changes: 0 additions & 15 deletions src/Mapbender/WmsBundle/Component/VendorSpecific.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,4 @@ public function getParameterName()
{
return $this->name;
}

/**
* @deprecated, only used (indirectly) by WmcParser110
* @return array
*/
public function getConfiguration()
{
return array(
'default' => $this->getDefault(),
'name' => $this->getName(),
'__name' => $this->getParameterName(),
'hidden' => $this->getHidden(),
'vstype' => $this->getVstype(),
);
}
}