Neos.Neos/Classes/Domain/Strategy/AssetUsageInNodePropertiesStrategy.php
public function getUsageReferences(AssetInterface $asset)
    {
        $assetIdentifier = $this->persistenceManager->getIdentifierByObject($asset);
        if (isset($this->firstlevelCache[$assetIdentifier])) {
            return $this->firstlevelCache[$assetIdentifier];
        }

        $relatedNodes = array_map(function (NodeData $relatedNodeData) use ($asset) {
            return new AssetUsageInNodeProperties($asset,
                $relatedNodeData->getIdentifier(),
                $relatedNodeData->getWorkspace()->getName(),
                $relatedNodeData->getDimensionValues(),
                $relatedNodeData->getNodeType()->getName()
            );
        }, $this->getRelatedNodes($asset));

        $this->firstlevelCache[$assetIdentifier] = $relatedNodes;
        return $this->firstlevelCache[$assetIdentifier];
    }
public function getUsageReferences(AssetInterface $asset)
    {
        $assetIdentifier = $this->persistenceManager->getIdentifierByObject($asset);
        if (isset($this->firstlevelCache[$assetIdentifier])) {
            return $this->firstlevelCache[$assetIdentifier];
        }

        $relatedNodes = array_map(function (NodeData $relatedNodeData) use ($asset) {
            return new AssetUsageInNodeProperties($asset,
                $relatedNodeData->getIdentifier(),
                $relatedNodeData->getWorkspace()->getName(),
                $relatedNodeData->getDimensionValues(),
                $relatedNodeData->getNodeType()->getName()
            );
        }, $this->getRelatedNodes($asset));

        $this->firstlevelCache[$assetIdentifier] = $relatedNodes;
        return $this->firstlevelCache[$assetIdentifier];
    }
public function getUsageReferences ( AssetInterface $ asset ) { $ assetIdentifier = $ this -> persistenceManager -> getIdentifierByObject ( $ asset ) ; if ( isset ( $ this -> firstlevelCache [ $ assetIdentifier ] ) ) { return $ this -> firstlevelCache [ $ assetIdentifier ] ; } $ relatedNodes = array_map ( function ( NodeData $ relatedNodeData ) use ( $ asset ) { return new AssetUsageInNodeProperties ( $ asset , $ relatedNodeData -> getIdentifier ( ) , $ relatedNodeData -> getWorkspace ( ) -> getName ( ) , $ relatedNodeData -> getDimensionValues ( ) , $ relatedNodeData -> getNodeType ( ) -> getName ( ) ) ; } , $ this -> getRelatedNodes ( $ asset ) ) ; $ this -> firstlevelCache [ $ assetIdentifier ] = $ relatedNodes ; return $ this -> firstlevelCache [ $ assetIdentifier ] ; }
Returns an array of usage reference objects.

@param AssetInterface $asset
@return array<\Neos\Neos\Domain\Model\Dto\AssetUsageInNodeProperties>
@throws \Neos\ContentRepository\Exception\NodeConfigurationException
Returns an array of usage reference objects .