eZ\Publish\Core\SignalSlot\LocationService::createLocation PHP Method

createLocation() public method

Creates the new $location in the content repository for the given content.
public createLocation ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\LocationCreateStruct $locationCreateStruct ) : eZ\Publish\API\Repository\Values\Content\Location
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$locationCreateStruct eZ\Publish\API\Repository\Values\Content\LocationCreateStruct
return eZ\Publish\API\Repository\Values\Content\Location the newly created Location
    public function createLocation(ContentInfo $contentInfo, LocationCreateStruct $locationCreateStruct)
    {
        $returnValue = $this->service->createLocation($contentInfo, $locationCreateStruct);
        $this->signalDispatcher->emit(new CreateLocationSignal(array('contentId' => $contentInfo->id, 'locationId' => $returnValue->id)));
        return $returnValue;
    }