public function action(Action $action) {
        if($action->register === Action::REGISTER_AT_END) {
            $this->registerActionsLast[] = $action;
        } else {
            if($action->register) {
                $this->registerAction($action);
            }
        }
    }