class SiteService (View source)

A service for manipulating sites

Constants

SITES_ROOT_PATH

This is the node path of the root for all sites in neos.

Properties

protected NodeDataRepository $nodeDataRepository
protected DomainRepository $domainRepository
protected SiteRepository $siteRepository
protected WorkspaceRepository $workspaceRepository
protected PersistenceManagerInterface $persistenceManager
protected AssetCollectionRepository $assetCollectionRepository

Methods

void
pruneSite(Site $site)

Remove given site all nodes for that site and all domains associated.

void
pruneAll()

Remove all sites and their respective nodes and domains

void
assignUploadedAssetToSiteAssetCollection(Asset $asset, NodeInterface $node, string $propertyName)

Adds an asset to the asset collection of the site it has been uploaded to Note: This is usually triggered by the ContentController::assetUploaded signal

void
emitSitePruned(Site $site)

Signal that is triggered whenever a site has been pruned

Details

void pruneSite(Site $site)

Remove given site all nodes for that site and all domains associated.

Parameters

Site $site

Return Value

void

void pruneAll()

Remove all sites and their respective nodes and domains

Return Value

void

void assignUploadedAssetToSiteAssetCollection(Asset $asset, NodeInterface $node, string $propertyName)

Adds an asset to the asset collection of the site it has been uploaded to Note: This is usually triggered by the ContentController::assetUploaded signal

Parameters

Asset $asset
NodeInterface $node
string $propertyName

Return Value

void

protected void emitSitePruned(Site $site)

Signal that is triggered whenever a site has been pruned

Parameters

Site $site

The site that was pruned

Return Value

void