PHP 클래스 Neos\Media\Domain\Service\AssetService

파일 보기 프로젝트 열기: neos/neos-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$packageManager Neos\Flow\Package\PackageManagerInterface
$reflectionService Neos\Flow\Reflection\ReflectionService
$resourceManager Neos\Flow\ResourceManagement\ResourceManager
$thumbnailService ThumbnailService
$uriBuilder Neos\Flow\Mvc\Routing\UriBuilder
$usageStrategies array

공개 메소드들

메소드 설명
emitAssetCreated ( Neos\Media\Domain\Model\AssetInterface $asset ) : void Signals that an asset was added.
emitAssetRemoved ( Neos\Media\Domain\Model\AssetInterface $asset ) : void Signals that an asset was removed.
emitAssetResourceReplaced ( Neos\Media\Domain\Model\AssetInterface $asset ) : void Signals that a resource on an asset has been replaced
emitAssetUpdated ( Neos\Media\Domain\Model\AssetInterface $asset ) : void Signals that an asset was updated.
getRepository ( Neos\Media\Domain\Model\AssetInterface $asset ) : Neos\Flow\Persistence\RepositoryInterface Returns the repository for an asset
getThumbnailUriAndSizeForAsset ( Neos\Media\Domain\Model\AssetInterface $asset, ThumbnailConfiguration $configuration, ActionRequest $request = null ) : array | null Calculates the dimensions of the thumbnail to be generated and returns the thumbnail URI.
getUsageCount ( Neos\Media\Domain\Model\AssetInterface $asset ) : integer Returns the total count of times an asset is used.
getUsageReferences ( Neos\Media\Domain\Model\AssetInterface $asset ) : array<\Neos\Media\Domain\Model\Dto\UsageReference> Returns an array of asset usage references.
isInUse ( Neos\Media\Domain\Model\AssetInterface $asset ) : boolean Returns true if the asset is used.
replaceAssetResource ( Neos\Media\Domain\Model\AssetInterface $asset, PersistentResource $resource, array $options = [] ) : void Replace resource on an asset. Takes variants and redirect handling into account.
validateRemoval ( Neos\Media\Domain\Model\AssetInterface $asset ) : void Validates if the asset can be removed

보호된 메소드들

메소드 설명
getUsageStrategies ( ) : array<\Neos\Media\Domain\Strategy\AssetUsageStrategyInterface> Returns all registered asset usage strategies

메소드 상세

emitAssetCreated() 공개 메소드

Signals that an asset was added.
public emitAssetCreated ( Neos\Media\Domain\Model\AssetInterface $asset ) : void
$asset Neos\Media\Domain\Model\AssetInterface
리턴 void

emitAssetRemoved() 공개 메소드

Signals that an asset was removed.
public emitAssetRemoved ( Neos\Media\Domain\Model\AssetInterface $asset ) : void
$asset Neos\Media\Domain\Model\AssetInterface
리턴 void

emitAssetResourceReplaced() 공개 메소드

Signals that a resource on an asset has been replaced
public emitAssetResourceReplaced ( Neos\Media\Domain\Model\AssetInterface $asset ) : void
$asset Neos\Media\Domain\Model\AssetInterface
리턴 void

emitAssetUpdated() 공개 메소드

Signals that an asset was updated.
public emitAssetUpdated ( Neos\Media\Domain\Model\AssetInterface $asset ) : void
$asset Neos\Media\Domain\Model\AssetInterface
리턴 void

getRepository() 공개 메소드

Returns the repository for an asset
public getRepository ( Neos\Media\Domain\Model\AssetInterface $asset ) : Neos\Flow\Persistence\RepositoryInterface
$asset Neos\Media\Domain\Model\AssetInterface
리턴 Neos\Flow\Persistence\RepositoryInterface

getThumbnailUriAndSizeForAsset() 공개 메소드

In case of Images this is a thumbnail of the image, in case of other assets an icon representation.
public getThumbnailUriAndSizeForAsset ( Neos\Media\Domain\Model\AssetInterface $asset, ThumbnailConfiguration $configuration, ActionRequest $request = null ) : array | null
$asset Neos\Media\Domain\Model\AssetInterface
$configuration Neos\Media\Domain\Model\ThumbnailConfiguration
$request Neos\Flow\Mvc\ActionRequest Request argument must be provided for asynchronous thumbnails
리턴 array | null Array with keys "width", "height" and "src" if the thumbnail generation work or null

getUsageCount() 공개 메소드

Returns the total count of times an asset is used.
public getUsageCount ( Neos\Media\Domain\Model\AssetInterface $asset ) : integer
$asset Neos\Media\Domain\Model\AssetInterface
리턴 integer

getUsageReferences() 공개 메소드

Returns an array of asset usage references.
public getUsageReferences ( Neos\Media\Domain\Model\AssetInterface $asset ) : array<\Neos\Media\Domain\Model\Dto\UsageReference>
$asset Neos\Media\Domain\Model\AssetInterface
리턴 array<\Neos\Media\Domain\Model\Dto\UsageReference>

getUsageStrategies() 보호된 메소드

Returns all registered asset usage strategies
protected getUsageStrategies ( ) : array<\Neos\Media\Domain\Strategy\AssetUsageStrategyInterface>
리턴 array<\Neos\Media\Domain\Strategy\AssetUsageStrategyInterface>

isInUse() 공개 메소드

Returns true if the asset is used.
public isInUse ( Neos\Media\Domain\Model\AssetInterface $asset ) : boolean
$asset Neos\Media\Domain\Model\AssetInterface
리턴 boolean

replaceAssetResource() 공개 메소드

Replace resource on an asset. Takes variants and redirect handling into account.
public replaceAssetResource ( Neos\Media\Domain\Model\AssetInterface $asset, PersistentResource $resource, array $options = [] ) : void
$asset Neos\Media\Domain\Model\AssetInterface
$resource Neos\Flow\ResourceManagement\PersistentResource
$options array
리턴 void

validateRemoval() 공개 메소드

Validates if the asset can be removed
public validateRemoval ( Neos\Media\Domain\Model\AssetInterface $asset ) : void
$asset Neos\Media\Domain\Model\AssetInterface
리턴 void

프로퍼티 상세

$objectManager 보호되어 있는 프로퍼티

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
리턴 Neos\Flow\ObjectManagement\ObjectManagerInterface

$packageManager 보호되어 있는 프로퍼티

protected PackageManagerInterface,Neos\Flow\Package $packageManager
리턴 Neos\Flow\Package\PackageManagerInterface

$reflectionService 보호되어 있는 프로퍼티

protected ReflectionService,Neos\Flow\Reflection $reflectionService
리턴 Neos\Flow\Reflection\ReflectionService

$resourceManager 보호되어 있는 프로퍼티

protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager
리턴 Neos\Flow\ResourceManagement\ResourceManager

$thumbnailService 보호되어 있는 프로퍼티

protected ThumbnailService,Neos\Media\Domain\Service $thumbnailService
리턴 ThumbnailService

$uriBuilder 보호되어 있는 프로퍼티

protected UriBuilder,Neos\Flow\Mvc\Routing $uriBuilder
리턴 Neos\Flow\Mvc\Routing\UriBuilder

$usageStrategies 보호되어 있는 프로퍼티

protected array $usageStrategies
리턴 array