Neos\Flow\Mvc\Controller\Arguments::hasArgument PHP Method

hasArgument() public method

Checks if an argument with the specified name exists
See also: offsetExists()
public hasArgument ( string $argumentName ) : boolean
$argumentName string Name of the argument to check for
return boolean TRUE if such an argument exists, otherwise FALSE
    public function hasArgument($argumentName)
    {
        return $this->offsetExists($argumentName);
    }

Usage Example

 /**
  * Initialize the property mapping configuration in $controllerArguments if
  * the trusted properties are set inside the request.
  *
  * @param ActionRequest $request
  * @param Arguments $controllerArguments
  * @return void
  */
 public function initializePropertyMappingConfigurationFromRequest(ActionRequest $request, Arguments $controllerArguments)
 {
     $trustedPropertiesToken = $request->getInternalArgument('__trustedProperties');
     if (!is_string($trustedPropertiesToken)) {
         return;
     }
     $serializedTrustedProperties = $this->hashService->validateAndStripHmac($trustedPropertiesToken);
     $trustedProperties = unserialize($serializedTrustedProperties);
     foreach ($trustedProperties as $propertyName => $propertyConfiguration) {
         if (!$controllerArguments->hasArgument($propertyName)) {
             continue;
         }
         $propertyMappingConfiguration = $controllerArguments->getArgument($propertyName)->getPropertyMappingConfiguration();
         $this->modifyPropertyMappingConfiguration($propertyConfiguration, $propertyMappingConfiguration);
     }
 }
All Usage Examples Of Neos\Flow\Mvc\Controller\Arguments::hasArgument