Called to handle a bulk action

@param $redirect_to
@param $action_name
@param $post_ids
@return string
427451
public function handleBulkActions($redirect_to, $action_name, $post_ids) {
        if('ilab_regenerate_thumbnails' === $action_name) {
            if(count($post_ids) > 0) {
                set_site_transient($this->batchPrefix().'_post_selection', $post_ids, 10);
                return 'admin.php?page='.$this->menuSlug();
            }
        }

        return $redirect_to;
    }
1366426
private function action($action_name) {
    	// if no principal action is set yet or is the same
		if(!$this->Action || $action_name == $this->Action) {
			// set the main action
			$this->Action = $action_name;
		}
		// an action has already been set, this is impossible
		else { Throw new Exception("Query->action({$action_name}) : An incompatible action already exists : {$this->Action}"); }
    }
47964
private function redirect(string $redirect, int $categoryID, int $postTypeID)
    {
        $adminPrefix = Config::get('project')['adminPrefix'];
        if($redirect == 'save') {
            $redirectUrl = "/".$adminPrefix."/".App::getLocale()."/post-type/categoryupdate/".$categoryID;
            $view = 'categoryupdate';
            $redirectID = $categoryID;
        }else if($redirect == 'close') {
            $redirectUrl = "/".$adminPrefix."/".App::getLocale()."/post-type/categorylist/".$postTypeID;
            $view = 'categorylist';
            $redirectID = $postTypeID;
        }else{
            $redirectUrl = "/".$adminPrefix."/".App::getLocale()."/post-type/categorycreate/".$postTypeID;
            $view = 'categorycreate';
            $redirectID = $postTypeID;
        }

        return[
            "url" => $redirectUrl,
            "view" => $view,
            "id" => $redirectID
        ];
    }
988291
public function handleActions($topic_id, $action)
    {
        $action = Container::get('hooks')->fire('model.topic.handle_actions_start', $action, $topic_id);

        // If action=new, we redirect to the first new post (if any)
        if ($action == 'new') {
            if (!User::get()->is_guest) {
                // We need to check if this topic has been viewed recently by the user
                $tracked_topics = Track::getTrackedTopics();
                $last_viewed = isset($tracked_topics['topics'][$topic_id]) ?
                    $tracked_topics['topics'][$topic_id] : User::get()->last_visit;

                $first_new_post_id = DB::forTable('posts')
                                        ->where('topic_id', $topic_id)
                                        ->where_gt('posted', $last_viewed)
                                        ->min('id');

                $first_new_post_id = Container::get('hooks')
                    ->fire('model.topic.handle_actions_first_new', $first_new_post_id);

                if ($first_new_post_id) {
                    return Router::redirect(
                        Router::pathFor('viewPost', ['pid' => $first_new_post_id]).'#p'.$first_new_post_id
                    );
                }
            }

            // If there is no new post, we go to the last post
            $action = 'last';
        }

        // If action=last, we redirect to the last post
        if ($action == 'last') {
            $last_post_id = DB::forTable('posts')
                                ->where('topic_id', $topic_id)
                                ->max('id');

            $last_post_id = Container::get('hooks')->fire('model.topic.handle_actions_last_post', $last_post_id);

            if ($last_post_id) {
                return Router::redirect(Router::pathFor('viewPost', ['pid' => $last_post_id]).'#p'.$last_post_id);
            }
        }

        Container::get('hooks')->fire('model.topic.handle_actions', $action, $topic_id);
    }
869019
private function _createRoute( $controller_name, $action_name )
    {
        $route = new Router\Route();

        $route->setControllerName( $controller_name );
        $route->setActionName( $action_name );

        return $route;
    }
109298
def delete_actions(self, form_id, action_ids):
        

        response = self._client.session.delete(
            '{url}/{form_id}/actions/delete'.format(
                url=self.endpoint_url, form_id=form_id
            ),
            params={'actions': action_ids}
        )
        return self.process_response(response)
188363
static function head($form_name,$method='post',$action='',$if_upload=false,$attrArray=null)
	{
	    if($if_upload) $attrArray['enctype'] = "multipart/form-data";
	    $attrStr = self::input_attr($attrArray);
	    return "action='$action' method='$method' name='$form_name' id='$form_name' $attrStr";
	}
1192300
protected function redirectToAction(
        $action,
        array $parameters = [],
        $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH,
        $status = 302
    ) {
        $url = $this->container->get(AdminRouter::class)
            ->generateAdminPath($this->admin, $action, $parameters, $referenceType);

        return new RedirectResponse($url, $status);
    }
864170
def _cache_lazy_values
      action_links.each(&:name_to_cache) if cache_action_link_urls
      columns.select(&:sortable?).each(&:sort)
      columns.select(&:searchable?).each(&:search_sql)
      actions.each do |action_name|
        action = send(action_name)
        Array(action.class.columns_collections).each { |method| action.send(method) }
      end
    end
705114
public function removeActionByName($action_name)
    {
        foreach($this->_actions as $key => $action)
        {
            if(strpos($action, $action_name) !== false)
            {
                array_splice($this->_actions, $key, 1);
            }
        }
        return $this->_actions;
    }
95027
protected function getBatchActionConfirmationResponse($actionId, array $selectedIds)
    {
        $response = null;

        if (empty($selectedIds)) {
            // No IDs, so redirect to the index page.
            $response = $this->getIndexRedirectionResponse();
        } else {
            // There are IDs, so display the confirmation page.
            $response = $this->getHtmlResponse();
            $collectionName = $this->getCollectionName();
            $response->setTemplateId(sprintf('%s/%s',
                $collectionName,
                $actionId
            ));
            $response->setData($collectionName, $selectedIds);
        }

        return $response;
    }
858481
function handleActions(handlers, defaultState, ctx) {
  var reducers = (0, _keys2.default)(handlers).map(function (type) {
    return handleAction(type, handlers[type], ctx);
  });
  // 将 reducer 包装成调用链，这里有个问题：
  // 由于这个链式调用并不保障每次 reducers 对 state 进行更新时，链内只有一个 reducer 响应 actionType。
  // 导致的结果是如果有多个 reducer 对同一 actionType 进行响应的话，无法保证这些 reducers 之间的调用顺序。

  // 更新：
  // 这样做的目的是因为，一般对于同一个 actionType 允许有多个 reducer 进行响应，而这些 reducers 每个都负责维护不同的 state 结构，故当多个 reducer 对同一 actionType 进行响应时，reducers 的调用顺序无关紧要。
  var reducer = reduceReducers.apply(undefined, (0, _toConsumableArray3.default)(reducers));
  return function () {
    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState;
    var action = arguments[1];
    return reducer(state, action);
  };
}
335211
public function assertRedirectedToAction($name, $parameters = [], $with = [])
    {
        return $this->assertRedirectedTo($this->app['url']->action($name, $parameters), $with);
    }
1307864
protected function redirectByAction()
    {
        $params = $this->request->getArguments();
        $formAction = $params["formAction"];
        $arguments = array();
        if ($params["storage"]["type"] == "pages") {
            $arguments["layoutIdentifier"] = $this->backendLayoutRepository->findByIdentifier($params["storage"]["elements"]["key"],
                explode(",", $this->extSettings['backendlayout_pids']))->getIdentifier();
        } else {
            $arguments["key"] = $params["storage"]["elements"]["key"];
            $arguments["type"] = $params["storage"]["type"];
        }
        if (key_exists("save", $formAction)) {
            $this->redirect('edit', null, null, $arguments);
        } else {
            if (key_exists("saveAndExit", $formAction)) {
                $this->redirect('list');
            }
        }
    }
938189
public function admin_modal_bail_post_redirect( $location, $post_id ) {

		if ( ! pods_is_modal_window() ) {
			return $location;
		}

		$post_title = get_the_title( $post_id );

		$field_args = (object) array(
			'options' => array(
				'pick_object' => 'post_type',
				'pick_val'    => get_post_type( $post_id ),
			),
			'value'   => array(
				$post_id => $post_title,
			),
		);

		$this->admin_modal_bail( $post_id, $post_title, $field_args );

		return $location;

	}
523923
public function getRedirectResponse($params)
    {
        if ('GET' === $this->redirectMethod) {
            $url = $this->composeUrl($this->redirectUrl, $params);
            Yii::$app->response->redirect($url);
            Yii::$app->end();
        } elseif ('POST' === $this->redirectMethod) {
            $hiddenFields = '';
            foreach ($params as $key => $value) {
                $hiddenFields .= sprintf(
                        '<input type="hidden" name="%1$s" value="%2$s" />',
                        htmlentities($key, ENT_QUOTES, 'UTF-8', false),
                        htmlentities($value, ENT_QUOTES, 'UTF-8', false)
                    ) . "\n";
            }
            $output = '<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Redirecting...</title>
    </head>
    <body onload="document.forms[0].submit();" style=" text-align:center;background-color: #eff0f1;">
		<img src="data:image/gif;base64,R0lGODlhMgAyAKIHAP////vZu/JyBfvavvvavfJ2DPN4D////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBwAHACwAAAAAMgAyAEADpXi63P4wygmFETTLwHvIQCgCWjOKpXOGqcmmaNuupGzfeK5PwfAxgqAQw4jtjjlj8mWjuWoLJ3JKrVqvk6EQe/B0GhZidHXs/UrKJnMJ1UjVJ65c8ZbUcel7Gruf+/+AgYKDO0MFhApaFnIeBA0FQodFIztePSBkOgQdjm6UiKBccWxrFHcwmZ59qKuhrqRtE6OwpRCnMrN0n2OtR7d/ua/Cw8Q7CQAh+QQFBwAHACwMAAgAGwALAEADNHi6rPEtHkArkFHoLVRtTwgxG8aIoTlZFDguXLleaqbVjoib6IuxrhSJM7PsYjfg7hA7JAAAIfkEBQcABwAsFgAIABUAFQBAAzd4B6z+MMZAa5DYic0F+81TZWRpHpwCfqfDihbVKuMcpXOXrvManjxY7RSTtWK2pLKky+kEzlQCACH5BAUHAAcALCAADAALABsAQAM0eAes/jC6QJW4WDzGm6RgdWBRx5WeNIlPCKpORkIzZNomgJ9w7x8uiIulCP58MppM80g+EgAh+QQFBwAHACwWABYAFQAVAEADOHi63AfQyamEvaKFTfuDINBtJNdcXiqFoLq0KjmhTCkvGO2q7M5Grt5uSNSUdjYTDmO8LXM7qCsBACH5BAUHAAcALAwAIAAbAAsAQAMzeCes/tCBGWO4OFTHensYNI2T120iSS2fk4XPiELwzJ62RN5efqgUEy2Tks1eF9/mZUsAACH5BAUHAAcALAgAFgAVABUAQAM4eCes/jDKOYOFIGvAeqOVJQZgiWWK15nPyobke4ziCcjHpi2erH4sFW5ILNFktMvr+NDJdKiXMwEAIfkEBQcABwAsCAAMAAsAGwBAAzR4utL7cIUZH7gYvMbb/FSlYFHHlY4UPuAnvmN2RSR6bqYAmXCvuqxWANLyGSsyiGxmyRwSADs=" style="width:80px;margin-left:auto; margin-top:200px ">
        <form action="%1$s" method="post" style="opacity:0">
            <p>Redirecting to payment page...</p>
            <p>
                %2$s
                <input type="submit" value="Continue" />
            </p>
        </form>
    </body>
</html>';
            $output = sprintf(
                $output,
                htmlentities($this->redirectUrl, ENT_QUOTES, 'UTF-8', false),
                $hiddenFields
            );

            Yii::$app->response->content = $output;
            Yii::$app->end();
        }

        throw new \Exception('Invalid redirect method "' . $this->redirectMethod . '".');
    }
1227605
protected function redirectToAction(string $alias = null, array $params = []): RedirectResponse
    {
        if (empty($alias)) {
            $routerConfig = $this->getRouter()->getConfiguration();
            $alias = "{$routerConfig->getDefaultController()}:{$routerConfig->getDefaultAction()}";
        }

        $query = $this->getRouter()->getQuery($alias, $params);
        $headers = $this->getResponse()->headers->all();

        return new RedirectResponse($query, Response::HTTP_FOUND, $headers);
    }