AssetUsageInNodePropertiesStrategy
class AssetUsageInNodePropertiesStrategy extends AbstractAssetUsageStrategy (View source)
Traits
A trait to add create a content context
Properties
protected ContentContextFactory | $_contextFactory | from CreateContentContextTrait | |
protected SiteRepository | $_siteRepository | from CreateContentContextTrait | |
protected NodeDataRepository | $nodeDataRepository | ||
protected array | $firstlevelCache | ||
protected PersistenceManagerInterface | $persistenceManager |
Methods
bool
int
createContentContext(string $workspaceName, array $dimensions = [])
Create a ContentContext based on the given workspace name
createContextMatchingNodeData(NodeData $nodeData)
Generates a Context that exactly fits the given NodeData Workspace, Dimensions & Site.
array
Details
bool
isInUse(AssetInterface $asset)
Returns true if the asset is used.
int
getUsageCount(AssetInterface $asset)
Returns the total count of usages found.
protected ContentContext
createContentContext(string $workspaceName, array $dimensions = [])
Create a ContentContext based on the given workspace name
protected ContentContext
createContextMatchingNodeData(NodeData $nodeData)
Generates a Context that exactly fits the given NodeData Workspace, Dimensions & Site.
UsageReference[]
getUsageReferences(AssetInterface $asset)
Returns an array of usage reference objects.
array
getRelatedNodes(AssetInterface $asset)
Returns all nodes that use the asset in a node property.