Neos\Flow\Mvc\ActionRequest::getInternalArgument PHP Метод

getInternalArgument() публичный Метод

Internal arguments are set via setArgument(). In order to be handled as an internal argument, its name must start with two underscores.
public getInternalArgument ( string $argumentName ) : string
$argumentName string Name of the argument, for example "__fooBar"
Результат string Value of the argument, or NULL if not set.
    public function getInternalArgument($argumentName)
    {
        return isset($this->internalArguments[$argumentName]) ? $this->internalArguments[$argumentName] : null;
    }

Usage Example

Пример #1
0
 /**
  * @return void
  * @internal
  */
 protected function initializeCurrentPageFromRequest()
 {
     if (!$this->formState->isFormSubmitted()) {
         $this->currentPage = $this->formDefinition->getPageByIndex(0);
         return;
     }
     $this->lastDisplayedPage = $this->formDefinition->getPageByIndex($this->formState->getLastDisplayedPageIndex());
     // We know now that lastDisplayedPage is filled
     $currentPageIndex = (int) $this->request->getInternalArgument('__currentPage');
     if ($currentPageIndex > $this->lastDisplayedPage->getIndex() + 1) {
         // We only allow jumps to following pages
         $currentPageIndex = $this->lastDisplayedPage->getIndex() + 1;
     }
     // We now know that the user did not try to skip a page
     if ($currentPageIndex === count($this->formDefinition->getPages())) {
         // Last Page
         $this->currentPage = null;
     } else {
         $this->currentPage = $this->formDefinition->getPageByIndex($currentPageIndex);
     }
 }
All Usage Examples Of Neos\Flow\Mvc\ActionRequest::getInternalArgument