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

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

Sets the dispatched flag
public setDispatched ( boolean $flag ) : void
$flag boolean If this request has been dispatched
Результат void
    public function setDispatched($flag)
    {
        $this->dispatched = $flag ? true : false;
        if ($flag) {
            $this->emitRequestDispatched($this);
        }
    }

Usage Example

 /**
  * @test
  */
 public function setDispatchedEmitsSignalIfDispatched()
 {
     $mockDispatcher = $this->createMock(Dispatcher::class);
     $mockDispatcher->expects($this->once())->method('dispatch')->with(ActionRequest::class, 'requestDispatched', [$this->actionRequest]);
     $mockObjectManager = $this->createMock(ObjectManagerInterface::class);
     $mockObjectManager->expects($this->any())->method('get')->will($this->returnValue($mockDispatcher));
     $this->inject($this->actionRequest, 'objectManager', $mockObjectManager);
     $this->actionRequest->setDispatched(true);
 }
All Usage Examples Of Neos\Flow\Mvc\ActionRequest::setDispatched