Expand controller actions into Mux object

@return Mux
5597
public function expand(array $options = array(), $dynamic = false)
    {
        $mux   = new Mux();
        $target = $dynamic ? $this : $this->getClass();
        $mux->add('/:id', [$target, 'updateAction'], array_merge($options, array('method' => REQUEST_METHOD_POST   )));
        $mux->add('/:id', [$target, 'loadAction'],   array_merge($options, array('method' => REQUEST_METHOD_GET    )));
        $mux->add('/:id', [$target, 'deleteAction'], array_merge($options, array('method' => REQUEST_METHOD_DELETE )));
        $mux->add('', [$target, 'createAction'],     array_merge($options, array('method' => REQUEST_METHOD_POST   )));
        $mux->add('', [$target, 'collectionAction'], array_merge($options, array('method' => REQUEST_METHOD_GET    )));
        return $mux;
    }
28065
public function getBaseUri()
    {
        $controller = $this;
        return preg_replace_callback('/:(\w+)/', function ($matches) use ($controller) {
            return $controller->routeData($matches[1]);
        }, $this->baseUri);
    }
409615
protected function getControllerAction()
    {
        $action = $this->path['action'];
        if (is_array($action)) {
            return action($action[0], array_slice($action, 1));
        }

        return action($action);
    }
518718
protected function getFormActionUri()
    {
        /** @var ActionRequest $actionRequest */
        $actionRequest = $this->controllerContext->getRequest();
        $uri = $actionRequest->getHttpRequest()->getUri();
        if ($this->hasArgument('section')) {
            $uri = preg_replace('/#.*$/', '', $uri) . '#' . $this->arguments['section'];
        }
        return (string)$uri;
    }
661272
public static function build($controller)
    {
        $routes = array();
        $actions = self::parseActionMethods($controller);

        foreach ($actions as $actionName => $actionInfo) {
            list($annotations, $meta) = $actionInfo;

            if (isset($annotations['Route'])) {
                $path = $annotations['Route'];
            } else {
                if ($actionName === 'indexAction') {
                    $path = '';
                } else {
                    $path = self::translatePath($actionName); // '/' . preg_replace_callback('/[A-Z]/', function($matches) {
                }
            }

            $route = array($path, $actionName);

            if (isset($annotations['Method'])) {
                $route[] = array('method' => Mux::convertRequestMethodConstant($annotations['Method']));
            } else {
                $route[] = array();
            }
            $routes[] = $route;
        }

        return $routes;
    }
746506
protected function getFormActionUri()
    {
        if ($this->formActionUri !== null) {
            return $this->formActionUri;
        }
        if ($this->hasArgument('actionUri')) {
            $this->formActionUri = $this->arguments['actionUri'];
        } else {
            $uriBuilder = $this->controllerContext->getUriBuilder();
            if ($this->arguments['useParentRequest'] === true) {
                $request = $this->controllerContext->getRequest();
                if ($request->isMainRequest()) {
                    throw new ViewHelper\Exception('You can\'t use the parent Request, you are already in the MainRequest.', 1361354942);
                }
                $uriBuilder = clone $uriBuilder;
                $uriBuilder->setRequest($request->getParentRequest());
            }
            $uriBuilder
                ->reset()
                ->setSection($this->arguments['section'])
                ->setCreateAbsoluteUri($this->arguments['absolute'])
                ->setAddQueryString($this->arguments['addQueryString'])
                ->setFormat($this->arguments['format']);
            if (is_array($this->arguments['additionalParams'])) {
                $uriBuilder->setArguments($this->arguments['additionalParams']);
            }
            if (is_array($this->arguments['argumentsToBeExcludedFromQueryString'])) {
                $uriBuilder->setArgumentsToBeExcludedFromQueryString($this->arguments['argumentsToBeExcludedFromQueryString']);
            }
            try {
                $this->formActionUri = $uriBuilder
                    ->uriFor($this->arguments['action'], $this->arguments['arguments'], $this->arguments['controller'], $this->arguments['package'], $this->arguments['subpackage']);
            } catch (\Exception $exception) {
                throw new ViewHelper\Exception($exception->getMessage(), $exception->getCode(), $exception);
            }
        }
        return $this->formActionUri;
    }
875838
public function generateAjax()
    {
        $input = $this->getEnvironment()->getInputProvider();

        if ($input->hasValue('action')
            && ('DcGeneralLoadSubTree' === $input->getValue('action'))
        ) {
            $provider = $input->getValue('providerName');
            $rootId   = $input->getValue('id');
            $this->getEnvironment()->getSessionStorage()->set(
                $this->getToggleId(),
                $this->getTreeNodeStates()->toggleModel($provider, $rootId)->getStates()
            );
            $collection = $this->loadCollection($rootId, ((int) $input->getValue('level') + 1));
            return $this->generateTreeView($collection, 'tree');
        }

        return '';
    }
503229
public function getExtensions()
		{

			// Loop through extension map
			$exts = array();
			foreach (self::$extensionMap as $ext => $type) {
				if ($type == $this->type) {
					$exts[] = $ext;
				}
			}
			return $exts;

		}
95888
public function getExpandActions($actions)
    {
        $actions = (array) $actions;
        return array_flatten(array_map(function ($action) use ($actions) {
            return array_key_exists($action, $this->getAliasedActions()) ? [$action, $this->getExpandActions($this->getAliasedActions()[$action])] : $action;
        }, $actions));
    }
753750
public function getOperands()
    {
        $operandValues = [];
        foreach ($this->getOperandObjects() as $operand) {
            $value = $operand->getValue();

            if ($value === null) {
                continue;
            }

            if ($operand->isMultiple()) {
                $operandValues = array_merge($operandValues, $value);
            } else {
                $operandValues[] = $value;
            }
        }

        return array_merge($operandValues, $this->additionalOperands);
    }
1190646
public function getAction()
	{
		$action = strtolower($this->getParam(self::ACTION_PARAM));
		if ($action === '' or ! preg_match('/^[a-z0-9_-]+$/', $action)) {
			return Controller::DEFAULT_ACTION;
		}

		return $action;
	}
531814
public function getActionName()
    {
        $callableName = null;

        if ($this->isControllerAction()) {
            return $this->controllerName . '@' . $this->controllerMethod;
        }

        if (is_callable($this->callable, false, $callableName)) {
            list($controller, $method) = explode('::', $callableName);

            if ($controller === 'Closure') {
                return $controller;
            }

            return $controller . '@' . $method;
        }
    }
988678
public function getAction()
    {
        if (!is_null(self::$action)) {
            return self::$action;
        }
        $controllerParam = array_get($this->routeParams, 'controller');
        $match           = null;

        if (!preg_match("/.+?(?=@)@(.*)/", $controllerParam, $match)) {
            return;
        }
        self::$action = strtolower($match[1]);
        return self::$action;
    }
592171
public function truncate() {
		$this->_map     = [];
		$this->_data    = [];
		$this->_models  = [];
		$this->_pointer = 0;
		
		return $this;
	}
626988
public function runAction($postfix = null)
    {
        $longId = $this->getId($postfix);
        $action = $this->switch->controller->hasInternalAction($longId) ? $longId : $this->id;

        return $this->switch->controller->runAction($action);
    }
890165
public function getPrefix()
    {
        $params = $this->Controller->request->params;
        if (key_exists('prefix', $params)) {
            $prefix = $params['prefix'];
            if ($prefix) {
                return $prefix;
            }
        }
        return false;
    }
794017
public function getExcelActions()
  {
      if (null === $this->excelActions) {
          $this->excelActions = array();
          $this->fillExportActions();
      }

      return $this->excelActions;
  }