eZ\Publish\Core\Search\Common\Slot\CopyContent::receive PHP Method

receive() public method

Receive the given $signal and react on it.
public receive ( eZ\Publish\Core\SignalSlot\Signal $signal )
$signal eZ\Publish\Core\SignalSlot\Signal
    public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\ContentService\CopyContentSignal) {
            return;
        }
        $this->searchHandler->indexContent($this->persistenceHandler->contentHandler()->load($signal->dstContentId, $signal->dstVersionNo));
        $locations = $this->persistenceHandler->locationHandler()->loadLocationsByContent($signal->dstContentId);
        foreach ($locations as $location) {
            $this->searchHandler->indexLocation($location);
        }
    }
CopyContent