Commit fdc050b0 authored by Chivy Lim's avatar Chivy Lim

[IMP] Correct format of argument params

refs KIME-3609
parent 85e2c0ce
......@@ -34,6 +34,18 @@ class FrontendMappingService {
*/
protected $settings;
/**
* @Flow\Inject
* @var \TYPO3\Flow\Persistence\PersistenceManagerInterface
*/
protected $persistenceManager;
/**
* @Flow\Inject
* @var \TYPO3\Flow\Property\PropertyMapper
*/
protected $propertyMapper;
/**
* @param string $context
* @param \TYPO3\Flow\Mvc\ActionRequest $request
......@@ -48,8 +60,16 @@ class FrontendMappingService {
$name = $contextArgument['name'];
if (isset($contextArgument['static'])) {
$arguments[$name] = $contextArgument['static'];
} elseif ($request->hasArgument($name)) {
$value = $request->getArgument($name);
if (isset($contextArgument['domain'])) {
$object = $this->propertyMapper->convert($value, $contextArgument['domain']);
$arguments[$name] = $this->persistenceManager->getIdentifierByObject($object);
} else {
$arguments[$name] = $value;
}
} else {
$arguments[$name] = $request->hasArgument($name) ? $request->getArgument($name) : NULL;
$arguments[$name] = NULL;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment