Checks if the current action is the given one

@param string $actionName The action to check
@param string $view The view to check the action for. Current view if omited.

@return bool

@see currentAction(), setCurrentAction()
770326
function isCurrentAction( $actionName, $view = '' )
    {
        if ( $view == '' )
            $view = self::currentView();
        if ( $view == '' or $actionName == '' )
            return false;
        return $this->currentAction( $view ) == $actionName;
    }
41382
public function isViewable($action = null)
    {
        if ($action === Action::IDENTIFIER) {
            return false;
        }

        return $this->isVisible($action);
    }
650014
public function viewExists($view)
    {
        list($path, $view) = Modules::find($view, $this->_module, 'views/');
        return (bool) trim($path);
    }
905932
public function actionExists($id)
    {
        $inlineActionMethodName = 'action' . Inflector::camelize($id);
        if (method_exists($this->controller, $inlineActionMethodName)) {
            return true;
        }
        if (array_key_exists($id, $this->controller->actions())) {
            return true;
        }
        return false;
    }
140299
public function hasAction($action) {
    if (!parent::hasAction($action)) {
      if (
        ($this->hasMethod($action.'GET')) || ($this->hasMethod($action.'POST')) || ($this->hasMethod($action.'DELETE')) || ($this->hasMethod($action.'PUT')) || ($this->hasMethod($action.'PATCH'))
      ) {
        return true;
      }
    }
    return parent::hasAction($action);
  }
1131085
protected function currentAction()
    {
        $action = substr($action = Route::currentRouteAction(), strpos($action, '@') + 1);

        if (!method_exists($this, $action)) {
            $action = 'index';
        }

        return $action;
    }
1232236
public function match(View $view)
    {
        if (!$view instanceof SystemInfoView) {
            return false;
        }

        return $this->toIdentifier($view->getInfo()) === $this->identifier;
    }
1004511
private function translateActionName($actionName)
    {
        switch ($actionName) {
            case 'create':
                return Item::CREATE;
            case 'cut':
                return Item::CUT;
            case 'copy':
                return Item::COPY;
            case 'deepcopy':
                return Item::DEEP_COPY;
            default:
        }
        return null;
    }
34469
public function getCurrentActionName()
    {
        return isset($this->action_names[$this->position]) ? $this->action_names[$this->position] : null;
    }
1164942
public function rename($view, $name)
    {
        if ($view instanceof View) {
            $view = $view->getName();
        }

        $params = [View::ENTRY_NAME => $name];
        $this->getConnection()->put(
            UrlHelper::buildUrl(Urls::URL_VIEW, [$view, self::OPTION_RENAME]),
            $this->json_encode_wrapper($params)
        );

        return true;
    }
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\"");
        }
    }
1028535
public function match(View $view)
    {
        if (!$view instanceof TagValueView) {
            return false;
        }

        $keyword = $this->translationHelper->getTranslatedByMethod(
            $view->getTag(),
            'getKeyword'
        );

        return isset($this->values[$keyword]);
    }
177876
public function onView(ActionViewEvent $event)
    {
        $message = sprintf(
            'The action "%s" return not ResponseInterface instance. Try create Response instance via result data...',
            $event->getAction()->getName()
        );

        $this->logger->debug($message);
    }
959502
public function setAction()
    {
        // Constructs the current action method
        $this->action = strtolower($this->action) . 'Action';

        // Checks if the current action method exists in the current controller
        if (!method_exists($this->controller, $this->action)) {

            // Attributes the default action method to the current action method
            $this->action = self::DEFAULT_ACTION;
        }
    }
618492
public function checkViewExists($view)
    {
        if (!View::exists($view)) {
            if (Lang::has('resource-controller.viewnotfound')) {
                $message = trans('resource-controller.viewnotfound', ['view' => '$view']);
            } else {
                $message = 'Requested page couldn\'t be loaded because the view file is missing: '.$view;
            }

            throw new ResourceControllerException($message);
        }
    }
499793
public function has(string $view): bool
    {
        $path      = $this->get($view);
        $real      = $this->flow->native()->path($view . $this->flow->ext());
        $directory = \dirname($path);

        if (empty($this->paths[$view]) && ($this->flow->debugMode() || !File::exists($path)))
        {
            Dir::make($directory);

            return false;
        }

        return \filemtime($path) > \filemtime($real);
    }
212190
protected function isActive($action)
    {
        $id = $this->getActionId($action);
        return !in_array($id, $this->except, true) && (empty($this->only) || in_array($id, $this->only, true));
    }