eZ\Publish\Core\Persistence\Cache\LocationHandler::create PHP Method

create() public method

See also: eZ\Publish\SPI\Persistence\Content\Location\Handler::create
public create ( eZ\Publish\SPI\Persistence\Content\Location\CreateStruct $locationStruct )
$locationStruct eZ\Publish\SPI\Persistence\Content\Location\CreateStruct
    public function create(CreateStruct $locationStruct)
    {
        $this->logger->logCall(__METHOD__, array('struct' => $locationStruct));
        $location = $this->persistenceHandler->locationHandler()->create($locationStruct);
        $this->cache->getItem('location', $location->id)->set($location)->save();
        $this->cache->clear('location', 'subtree');
        $this->cache->clear('content', 'locations', $location->contentId);
        $this->cache->clear('content', $location->contentId);
        $this->cache->clear('content', 'info', $location->contentId);
        $this->cache->clear('user', 'role', 'assignments', 'byGroup', $location->contentId);
        $this->cache->clear('user', 'role', 'assignments', 'byGroup', 'inherited', $location->contentId);
        return $location;
    }