public static function createActionQueryString($actionId, string $addon, string $function, array $arguments = array()): string
    {
        if (empty($addon) && empty($function)) {
            TemplateRenderException::throw('Unknown addon and function while trying to create actionable query.');
        }
        
        $origin = Request::getCurrentUrl();
        
        $successDestination = ArrayUtils::getArrayValueForKeyOrDefault($arguments, 'successDestination', $origin);
        $errorDestination = ArrayUtils::getArrayValueForKeyOrDefault($arguments, 'errorDestination', $origin);
        
        $select = new \stdClass();
        
        if (!empty($actionId)) {
            $select->formId = $actionId;
        }
        
        $select->name = $addon;
        $select->method = $function;
        
        $select->successDestination = $successDestination;
        $select->errorDestination = $errorDestination;
        
        $select->origin = $origin;
        $select->arguments = $arguments;
        
        return Security::seal(json_encode($select));
    }
public static function createActionQueryString($actionId, string $addon, string $function, array $arguments = array()): string
    {
        if (empty($addon) && empty($function)) {
            TemplateRenderException::throw('Unknown addon and function while trying to create actionable query.');
        }
        
        $origin = Request::getCurrentUrl();
        
        $successDestination = ArrayUtils::getArrayValueForKeyOrDefault($arguments, 'successDestination', $origin);
        $errorDestination = ArrayUtils::getArrayValueForKeyOrDefault($arguments, 'errorDestination', $origin);
        
        $select = new \stdClass();
        
        if (!empty($actionId)) {
            $select->formId = $actionId;
        }
        
        $select->name = $addon;
        $select->method = $function;
        
        $select->successDestination = $successDestination;
        $select->errorDestination = $errorDestination;
        
        $select->origin = $origin;
        $select->arguments = $arguments;
        
        return Security::seal(json_encode($select));
    }
public static function createActionQueryString ( $ actionId , string $ addon , string $ function , array $ arguments = array ( ) ) : string { if ( empty ( $ addon ) && empty ( $ function ) ) { TemplateRenderException :: throw ( 'Unknown addon and function while trying to create actionable query.' ) ; } $ origin = Request :: getCurrentUrl ( ) ; $ successDestination = ArrayUtils :: getArrayValueForKeyOrDefault ( $ arguments , 'successDestination' , $ origin ) ; $ errorDestination = ArrayUtils :: getArrayValueForKeyOrDefault ( $ arguments , 'errorDestination' , $ origin ) ; $ select = new \ stdClass ( ) ; if ( ! empty ( $ actionId ) ) { $ select -> formId = $ actionId ; } $ select -> name = $ addon ; $ select -> method = $ function ; $ select -> successDestination = $ successDestination ; $ select -> errorDestination = $ errorDestination ; $ select -> origin = $ origin ; $ select -> arguments = $ arguments ; return Security :: seal ( json_encode ( $ select ) ) ; }
Generate sealed hash for an actionable function.

@param string $actionId
Identifier for this action which can later be used to retrieve additional information.

@param string $addon
Addon where the function to execute when this action gets requested can be found.

@param string $function
Function to execute when this action gets requested.

@param array $arguments
[optional]
Arguments for the function to execute when this action gets requested.

@return string Sealed hash for an action.
Generate sealed hash for an actionable function .