Exemplo n.º 1
0
 /**
  * Calls the specified action method and passes the arguments.
  *
  * If the action returns a string, it is appended to the content in the
  * response object. If the action doesn't return anything and a valid
  * view exists, the view is rendered automatically.
  *
  * @param string $actionMethodName Name of the action method to call
  * @return void
  * @author Robert Lemke <*****@*****.**>
  */
 protected function callActionMethod()
 {
     $start = microtime(true);
     if ($this->objectManager->getContext() == "Development" && $this->helper->getSettings("Admin.FlushCacheInDevelopment")) {
         $this->cacheManager->flushAdminCaches();
     }
     $this->indexAction();
     $preparedArguments = array();
     foreach ($this->arguments as $argument) {
         $preparedArguments[] = $argument->getValue();
     }
     $actionResult = $this->__call($this->actionMethodName, $preparedArguments);
     $debugInfo = array();
     if ($this->objectManager->getContext() == "Development") {
         $debugInfo[] = "exectime: " . number_format(microtime(true) - $start, 4) . "s";
     }
     $debugInfo[] = "";
     $this->view->assign("admin-debug-info", implode(" | ", $debugInfo));
     if ($actionResult === NULL && $this->view instanceof \TYPO3\FLOW3\MVC\View\ViewInterface) {
         $this->response->appendContent($this->view->render());
     } elseif (is_string($actionResult) && strlen($actionResult) > 0) {
         $this->response->appendContent($actionResult);
     } elseif (is_object($actionResult) && method_exists($actionResult, '__toString')) {
         $this->response->appendContent((string) $actionResult);
     }
 }