Neos.Neos/Classes/Domain/Strategy/AssetUsageInNodePropertiesStrategy.php
public function getRelatedNodes(AssetInterface $asset)
    {
        $relationMap = [];
        $relationMap[TypeHandling::getTypeForValue($asset)] = [$this->persistenceManager->getIdentifierByObject($asset)];

        if ($asset instanceof Image) {
            foreach ($asset->getVariants() as $variant) {
                $type = TypeHandling::getTypeForValue($variant);
                if (!isset($relationMap[$type])) {
                    $relationMap[$type] = [];
                }
                $relationMap[$type][] = $this->persistenceManager->getIdentifierByObject($variant);
            }
        }

        return $this->nodeDataRepository->findNodesByPathPrefixAndRelatedEntities(SiteService::SITES_ROOT_PATH, $relationMap);
    }
public function getRelatedNodes(AssetInterface $asset)
    {
        $relationMap = [];
        $relationMap[TypeHandling::getTypeForValue($asset)] = [$this->persistenceManager->getIdentifierByObject($asset)];

        if ($asset instanceof Image) {
            foreach ($asset->getVariants() as $variant) {
                $type = TypeHandling::getTypeForValue($variant);
                if (!isset($relationMap[$type])) {
                    $relationMap[$type] = [];
                }
                $relationMap[$type][] = $this->persistenceManager->getIdentifierByObject($variant);
            }
        }

        return $this->nodeDataRepository->findNodesByPathPrefixAndRelatedEntities(SiteService::SITES_ROOT_PATH, $relationMap);
    }
public function getRelatedNodes ( AssetInterface $ asset ) { $ relationMap = [ ] ; $ relationMap [ TypeHandling :: getTypeForValue ( $ asset ) ] = [ $ this -> persistenceManager -> getIdentifierByObject ( $ asset ) ] ; if ( $ asset instanceof Image ) { foreach ( $ asset -> getVariants ( ) as $ variant ) { $ type = TypeHandling :: getTypeForValue ( $ variant ) ; if ( ! isset ( $ relationMap [ $ type ] ) ) { $ relationMap [ $ type ] = [ ] ; } $ relationMap [ $ type ] [ ] = $ this -> persistenceManager -> getIdentifierByObject ( $ variant ) ; } } return $ this -> nodeDataRepository -> findNodesByPathPrefixAndRelatedEntities ( SiteService :: SITES_ROOT_PATH , $ relationMap ) ; }
Returns all nodes that use the asset in a node property.

@param AssetInterface $asset
@return array
Returns all nodes that use the asset in a node property .