[BUGFIX] Building url for ajax environment with routeEnhancer enabled
This commit is contained in:
parent
f62695055f
commit
47415deeac
@ -547,17 +547,32 @@ class ActionController extends BaseController
|
|||||||
if ($object == null) {
|
if ($object == null) {
|
||||||
$object = $this->arguments->getArgumentNames()[0];
|
$object = $this->arguments->getArgumentNames()[0];
|
||||||
}
|
}
|
||||||
|
$pluginArguments = [];
|
||||||
|
foreach ($this->arguments as $argument) {
|
||||||
|
if (in_array($argument->getName(), ['step', 'submit', $object])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (method_exists($argument->getValue(), 'getUid')) {
|
||||||
|
$pluginArguments[$argument->getName()]
|
||||||
|
= $argument->getValue()->getUid();
|
||||||
|
} else {
|
||||||
|
$pluginArguments[$argument->getName()] = $argument->getValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$arguments = [];
|
||||||
|
$arguments['cid'] = $this->contentObjectUid;
|
||||||
|
$arguments['type'] = $this->ajaxPageType;
|
||||||
$uri = $this->getControllerContext()
|
$uri = $this->getControllerContext()
|
||||||
->getUriBuilder()
|
->getUriBuilder()
|
||||||
->reset()
|
->reset()
|
||||||
->setCreateAbsoluteUri(true)
|
->setCreateAbsoluteUri(true)
|
||||||
->setAddQueryString(true)
|
->setAddQueryString(true)
|
||||||
->setTargetPageType($this->ajaxPageType)
|
->setTargetPageType($this->ajaxPageType)
|
||||||
->setArguments([
|
->setArguments($arguments)
|
||||||
'cid' => $this->contentObjectUid,
|
->uriFor(
|
||||||
'type' => $this->ajaxPageType,
|
$this->request->getControllerActionName(),
|
||||||
])
|
$pluginArguments
|
||||||
->uriFor($this->request->getControllerActionName());
|
);
|
||||||
$this->ajaxEnv = [
|
$this->ajaxEnv = [
|
||||||
'uri' => $uri,
|
'uri' => $uri,
|
||||||
'object' => $object,
|
'object' => $object,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user