class SiteService (View source)

A service for manipulating sites

Properties

protected DomainRepository $domainRepository
protected SiteRepository $siteRepository
protected ContentRepositoryRegistry $contentRepositoryRegistry
protected PersistenceManagerInterface $persistenceManager
protected AssetCollectionRepository $assetCollectionRepository
protected $siteNodeUtility
protected $domainUserService

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, Node $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

createSite(string $packageKey, string $siteName, string $nodeTypeName, string|null $nodeName = null, bool $inactive = false)

No description

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, Node $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
Node $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

Site createSite(string $packageKey, string $siteName, string $nodeTypeName, string|null $nodeName = null, bool $inactive = false)

No description

Parameters

string $packageKey
string $siteName
string $nodeTypeName
string|null $nodeName
bool $inactive

Return Value

Site