Verify that a default endpoint is supported by the API

@param $action

@return bool
331071
protected function isSupported($action)
    {
        if (empty($this->endpointsSupported) || in_array($action, $this->endpointsSupported)) {
            return true;
        }

        return $this->actionNotSupported($action);
    }
1343690
public function isFormAction($action)
    {
        $formActionss = preg_split('/[\s,]+/', $this->formActions, -1, PREG_SPLIT_NO_EMPTY);
        return !empty($this->modelClass) && in_array($action, $formActionss);
    }
1009554
public function seeCurrentActionIs($action)
    {
        $this->getRouteByAction($action); // Fails if route does not exists
        $currentRoute = $this->app->request->route();
        $currentAction = $currentRoute ? $currentRoute->getActionName() : '';
        $currentAction = ltrim(str_replace($this->getRootControllerNamespace(), "", $currentAction), '\\');

        if ($currentAction != $action) {
            $this->fail("Current action is \"$currentAction\"");
        }
    }
762020
protected function requireAuth($action) {
		if (isset ( $this->restCache ["authorizations"] )) {
			return array_search ( $action, $this->restCache ["authorizations"] ) !== false;
		}
		return false;
	}
353017
public function canExecute($action)
    {
        $ret = true;

        //Check if the action can be executed
        $method = 'can'.ucfirst($action);

        if (in_array($method, $this->_mixer->getMethods())) {
            $ret = $this->_mixer->$method();
        } else {
            //if method doesn't exist then check if the action
            //exists
            $actions = $this->getActions();
            $actions = array_flip($actions);
            $ret = isset($actions[$action]);
        }

        return $ret;
    }
184060
public function isExportFileAction($resource, $action)
    {
        return isset($this->exportFileActions[$resource]) && in_array($action, $this->exportFileActions[$resource]);
    }
838829
public function canExecute($action)
    {
        if (
            $this->isOwnable() &&
            $this->actor &&
            $this->actor->authorize('access') === false
            ) {
            return false;
        }

        return parent::canExecute($action);
    }
495832
public function isAction($action)
    {
        $isAction = parent::isAction($action);
        if ($isAction) {
            return true;
        }

        if ($this->_isActionMapped()) {
            return true;
        }

        return false;
    }
920726
function is_ajax_action( $actions ) {
            // Verify it's an ajax call.
            if ( ! self::is_ajax() ) {
                return false;
            }

            // Verify the call is relevant for the plugin.
            if ( $this->_module_id != fs_request_get( 'module_id' ) ) {
                return false;
            }

            // Verify it's one of the specified actions.
            if ( is_string( $actions ) ) {
                $actions = explode( ',', $actions );
            }

            if ( is_array( $actions ) && 0 < count( $actions ) ) {
                $ajax_action = fs_request_get( 'action' );

                foreach ( $actions as $action ) {
                    if ( $ajax_action === $this->get_action_tag( $action ) ) {
                        return true;
                    }
                }
            }

            return false;
        }
788525
protected function post_data($action)
  {
      $params = array(
        'PAYMENTACTION' => $action,
        'USER' => $this->options['login'],
        'PWD' => $this->options['password'],
        'VERSION' => $this->version,
        'SIGNATURE' => $this->options['signature'],
        'CURRENCYCODE' => $this->default_currency, );

      $this->post = array_merge($this->post, $params);

      return $this->urlize($this->post);
  }
126271
public function action($action)
    {
        $a = func_get_args();
        $controllerPath = $this->controller->getControllerActionPath();
        array_unshift($a, $controllerPath);
        $ret = call_user_func_array([$this, 'url'], $a);

        return $ret;
    }
1154400
public function hasMethod($action) {
		return array_key_exists($action, $this->actions())
        || method_exists($this, $action.config('app.action'));
	}
421373
public function checkAccess($action, $resource)
    {
        if ((is_null($resource) || is_null($resource->getId())) && (empty($action) || in_array(strtolower($action), array('list', 'create', 'post')))) {
            return true;
        }

        if (!is_null($resource)) {
            $query = $this->createQueryBuilder();
            $query->andWhere($query->getRootAliases()[0] . '.id = ' . $this->addNamedParameter('id', $resource, $query));
            $result = $this->getOneOrNullResultFromQueryBuilder($query);
            if ($result) {
                return true;
            } else {
                $this->throwException('Access for this resource has been denied', 'access-denied');
            }
        }
    }
1329148
protected function addApiVersion(string $action): string
    {
        if (mb_strpos($action, 'api.') === 0) {
            $action = preg_replace('/^api\./u', 'api-v'.$this->App::REST_ACTION_API_VERSION.'.', $action);
        }
        return $action; // With an API version.
    }
847074
public function beforeAction($action)
    {
        if (!parent::beforeAction($action)) {
            return false;
        }
        $warnings = Yii::$app->session->getFlash('warning');
        $maintenance = $this->maintenanceCheck($action, $warnings);
        if ($maintenance !== false) {
            return $maintenance;
        }
        $email = $this->emailCheck($warnings);
        if ($email !== false) {
            return $email;
        }
        $upgrade = $this->upgradeCheck($warnings);
        if ($upgrade !== false) {
            return $upgrade;
        }
        return true;
    }
263211
public function getSuggestStatus($action)
    {
        if (is_null($this->getOrder())) {
            return;
        }

        $status = $this->getOrderPaymentStatusPaymentValid();
        if (is_null($status)) {
            $status = $this->getStatusByAction($action);
        }

        return $status;
    }
784114
public function actionify($action)
    {
        if (false !== ($pos = strrpos($action, '.'))) {
            $action = substr($action, $pos + 1);
        }

        // if this is a service rather than just a controller name, the suffix
        // Action is not automatically appended to the method name
        if (false === strpos($this->baseControllerName, ':')) {
            $action .= 'Action';
        }

        return lcfirst(str_replace(' ', '', ucwords(strtr($action, '_-', '  '))));
    }