@param \Wanjee\Shuwee\AdminBundle\Admin\AdminInterface $admin
@param string $action
@param array $params

@return string
358815
public function generateUrl(AdminInterface $admin, $action, $params = [])
    {
        $routeName = $this->getRouteName($admin, $action);

        return $this->router->generate($routeName, $params);
    }
1088570
protected function sendRequest($request, $action = null, $params = array()) {
		$this->queryParams += $this->authProvider->queryParameters();
		
		if($action && $this->sendAsQueryParams($action->httpMethod())) {
			foreach ($params as $ns => $arr) {
				foreach ($arr as $k => $v) {
					$this->queryParams[ $ns."[$k]" ] = $v;
				}
			}
		}
		
		if(count($this->queryParams) > 0) {
			$url = $request->uri;
			$first = true;
			
			foreach($this->queryParams as $k => $v) {
				if($first) {
					$url .= '?';
					$first = false;
				} else $url .= '&';
				
				$url .= $k.'='.urlencode($v);
			}
			
			$request->uri = $url;
		}
		
		return $request->send();
	}
321006
public function invokeAction($action, $params = [])
    {

        //var_dump($this->request->getAttributes());

        //Will throw an exception if the method does not exists;
        $method = new ReflectionMethod($this, $action);

        if (!$method->isPublic()) {
            throw new Exception('Attempting to call a private method');
        }

        return $method->invokeArgs($this, $params);

    }
780558
public function create($actionName, $adminName, AdminConfiguration $adminConfiguration): ActionInterface
    {
        $event = new ConfigurationEvent(
            $actionName,
            $adminConfiguration->getParameter('actions'),
            $adminName,
            $adminConfiguration->getParameter('entity')
        );
        $this->eventDispatcher->dispatch(Events::CONFIGURATION_ACTION, $event);

        if (!array_key_exists($actionName, $event->getConfiguration())) {
            throw new Exception(
                'The action "'.$actionName.'" was not found  in the configuration of the admin "'.$adminName.'"'
            );
        }
        $actionConfiguration = $event->getConfiguration()[$actionName];
        $configuration = $this
            ->configurationFactory
            ->createActionConfiguration($actionName, $actionConfiguration, $adminName, $adminConfiguration)
        ;
        $class = $configuration->getParameter('class');
        $action = new $class($actionName, $configuration);

        if (!$action instanceof ActionInterface) {
            throw new Exception('The action class "'.$class.'" should implements '.ActionInterface::class);
        }

        return $action;
    }
301834
public function generateAdminPath(
        $admin,
        $actionCode,
        array $parameters = [],
        $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH
    ): string {
        $admin = $this->getAdmin($admin);
        $action = $admin->getAction($actionCode);

        $missingParams = $this->computeMissingRouteParameters($action->getRoute(), $parameters);
        foreach ($missingParams as $missingParam) {
            if ($this->router->getContext()->hasParameter($missingParam)) {
                $parameters[$missingParam] = $this->router->getContext()->getParameter($missingParam);
            }
        }

        return $this->router->generate($action->getRouteName(), $parameters, $referenceType);
    }
127810
public function soap(string $service, string $action, array $params = [])
    {
        switch ($service) {
            case "AVTransport":
            case "RenderingControl":
                $path = "MediaRenderer";
                break;
            case "ContentDirectory":
                $path = "MediaServer";
                break;
            case "AlarmClock":
            case "DeviceProperties":
            case "ZoneGroupTopology":
                $path = null;
                break;
            default:
                throw new \InvalidArgumentException("Unknown service: {$service}");
        }

        $location = "http://{$this->ip}:1400/";
        if (is_string($path)) {
            $location .= "{$path}/";
        }
        $location .= "{$service}/Control";

        $this->logger->info("sending soap request to: {$location}", $params);

        $soap = new \SoapClient(null, [
            "location"  =>  $location,
            "uri"       =>  "urn:schemas-upnp-org:service:{$service}:1",
            "trace"     =>  true,
        ]);

        $soapParams = [];
        $params["InstanceID"] = 0;
        foreach ($params as $key => $val) {
            $soapParams[] = new \SoapParam(new \SoapVar($val, \XSD_STRING), $key);
        }

        try {
            $result = $soap->__soapCall($action, $soapParams);
            $this->logger->debug("REQUEST: " . $soap->__getLastRequest());
            $this->logger->debug("RESPONSE: " . $soap->__getLastResponse());
        } catch (\SoapFault $e) {
            $this->logger->debug("REQUEST: " . $soap->__getLastRequest());
            $this->logger->debug("RESPONSE: " . $soap->__getLastResponse());
            throw new SoapException($e, $soap);
        }

        return $result;
    }
407846
private function retrieveFilterFieldDescription(
        AdminInterface $admin,
        string $field
    ): FieldDescriptionInterface {
        $admin->getFilterFieldDescriptions();

        $fieldDescription = $admin->getFilterFieldDescription($field);

        if (!$fieldDescription) {
            throw new \RuntimeException(sprintf('The field "%s" does not exist.', $field));
        }

        if (null === $fieldDescription->getTargetEntity()) {
            throw new \RuntimeException(sprintf('No associated entity with field "%s".', $field));
        }

        return $fieldDescription;
    }
988833
private function _action($params)
    {
        // Shift and get the method
        $method = array_shift($params);

        // Behavior
        if ($this->behaviors[$method]) {
            $this->behaviors[$method]();
        }

        if (!isset($this->routes[$method])) {
            $this->_defaultAction();
        }

        // Get corresponding method name
        $method = $this->routes[$method];

        if (!method_exists($this, $method)) {
            $this->_defaultAction();
        }

        return call_user_func_array([$this, $method], $params);
    }
1002410
public function _execute( $action, $params = array() ) 
	{
		if ( method_exists( $this, 'action_'.$action ) ) 
		{
			call_user_func( array( $this, 'action_'.$action ), $params );
		} 
		else 
		{
			CCCli::line( "There is no action {$action}.", 'red' );
		}
	}
1356157
private function getOperation(Action $action, EnvironmentInterface $environment)
    {
        /** @var Contao2BackendViewDefinitionInterface $definition */
        $definition = $environment->getDataDefinition()->getDefinition(Contao2BackendViewDefinitionInterface::NAME);
        $name       = $action->getName();
        $commands   = $definition->getModelCommands();

        if (!$commands->hasCommandNamed($name)) {
            return null;
        }

        return $commands->getCommandNamed($name);
    }
928855
private function createActionMiddleware($action, array $params){
        $middlewares    = [];

        $middlewares[]  = $this->container->get("core.middleware.action")
            ->setAction($action)
            ->setParams($params)
        ;

        return $middlewares;
    }
341858
function get_account_url( $action = false, $params = array(), $add_action_nonce = true ) {
            if ( is_string( $action ) ) {
                $params['fs_action'] = $action;
            }

            self::require_pluggable_essentials();

            return ( $add_action_nonce && is_string( $action ) ) ?
                fs_nonce_url( $this->_get_admin_page_url( 'account', $params ), $action ) :
                $this->_get_admin_page_url( 'account', $params );
        }
300384
public static function appUrl($action = null, $params = array(), $useIndex = true)
    {
        return self::url($action, $params, $useIndex, false);
    }
20376
def user_admin_urlname(action):
    
    user = get_user_model()
    return 'admin:%s_%s_%s' % (
        user._meta.app_label, user._meta.model_name,
        action)
893764
protected function buildFormParams(array $params, $action)
    {
        $params = $this->addCommonParams($params, $action);

        return $this->addSignature($params);
    }
66250
public function load(Action $action, array $params)
    {
        /** @var Argument $argument */
        foreach ($this->getArguments() as $argument) {
            if ($argument->isApplicable($params)) {
                $this->getServiceManager()->propagate($argument);
                $argument->load($action);
            }
        }
    }
93066
public function callSafe($entity, $action, $params = array()) {
    try {
      return $this->call($entity, $action, $params);
    }
    catch (GarbledMessageException $e) {
      return array(
        'is_error' => 1,
        'error_message' => "Client exception: " . $e->getMessage(),
        'garbled_message' => substr($e->getGarbledMessage()->getData(), 0, 77),
      );
    }
    catch (\Exception $e) {
      return array(
        'is_error' => 1,
        'error_message' => "Client exception: " . $e->getMessage(),
        'trace' => $e->getTraceAsString(),
      );
    }
  }