PHP Class Neos\Neos\Controller\Backend\ContentController

Inheritance: extends Neos\Flow\Mvc\Controller\ActionController, use trait Neos\Neos\Controller\BackendUserTranslationTrait, use trait Neos\Neos\Controller\CreateContentContextTrait
Datei anzeigen Open project: neos/neos-development-collection

Protected Properties

Property Type Description
$assetCollectionRepository Neos\Media\Domain\Repository\AssetCollectionRepository
$assetRepository Neos\Media\Domain\Repository\AssetRepository
$entityToIdentityConverter Neos\Neos\TypeConverter\EntityToIdentityConverter
$imageInterfaceArrayPresenter Neos\Media\TypeConverter\ImageInterfaceArrayPresenter
$imageRepository Neos\Media\Domain\Repository\ImageRepository
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$pluginService Neos\Neos\Service\PluginService The pluginService
$resourceManager Neos\Flow\ResourceManagement\ResourceManager
$siteRepository Neos\Neos\Domain\Repository\SiteRepository
$thumbnailService Neos\Media\Domain\Service\ThumbnailService

Public Methods

Method Description
assetsWithMetadataAction ( array $assets ) : string Fetch the metadata for multiple assets
createImageVariantAction ( ImageVariant $asset ) : string Generate a new image variant from given data.
imageWithMetadataAction ( Neos\Media\Domain\Model\ImageInterface $image ) : string Fetch the metadata for a given image
initializeCreateImageVariantAction ( ) : void Configure property mapping for adding a new image variant.
initializeUploadAssetAction ( ) Initialize property mapping as the upload usually comes from the Inspector JavaScript
masterPluginsAction ( string $workspaceName = 'live', array $dimensions = [] ) : string Fetch all master plugins that are available in the current workspace.
pluginViewsAction ( string $identifier = null, string $workspaceName = 'live', array $dimensions = [] ) : string Fetch the configured views for the given master plugin
uploadAssetAction ( Asset $asset, string $metadata ) : string Upload a new image, and return its metadata.

Protected Methods

Method Description
getAssetProperties ( Asset $asset ) : array
getImageInterfacePreviewData ( Neos\Media\Domain\Model\ImageInterface $image ) : array Returns important meta data for the given object implementing ImageInterface.
getImagePreviewData ( Image $image ) : array
getImageVariantPreviewData ( ImageVariant $imageVariant ) : array
initializeAssetsWithMetadataAction ( ) : void

Method Details

assetsWithMetadataAction() public method

Fetch the metadata for multiple assets
public assetsWithMetadataAction ( array $assets ) : string
$assets array
return string JSON encoded response

createImageVariantAction() public method

Generate a new image variant from given data.
public createImageVariantAction ( ImageVariant $asset ) : string
$asset Neos\Media\Domain\Model\ImageVariant
return string

getAssetProperties() protected method

protected getAssetProperties ( Asset $asset ) : array
$asset Neos\Media\Domain\Model\Asset
return array

getImageInterfacePreviewData() protected method

Will return an array with the following keys: "originalImageResourceUri": Uri for the original resource "previewImageResourceUri": Uri for a preview image with reduced size "originalDimensions": Dimensions for the original image (width, height, aspectRatio) "previewDimensions": Dimensions for the preview image (width, height) "object": object properties like the __identity and __type of the object
protected getImageInterfacePreviewData ( Neos\Media\Domain\Model\ImageInterface $image ) : array
$image Neos\Media\Domain\Model\ImageInterface The image to retrieve meta data for
return array

getImagePreviewData() protected method

protected getImagePreviewData ( Image $image ) : array
$image Neos\Media\Domain\Model\Image
return array

getImageVariantPreviewData() protected method

protected getImageVariantPreviewData ( ImageVariant $imageVariant ) : array
$imageVariant Neos\Media\Domain\Model\ImageVariant
return array

imageWithMetadataAction() public method

Fetch the metadata for a given image
public imageWithMetadataAction ( Neos\Media\Domain\Model\ImageInterface $image ) : string
$image Neos\Media\Domain\Model\ImageInterface
return string JSON encoded response

initializeAssetsWithMetadataAction() protected method

initializeCreateImageVariantAction() public method

Configure property mapping for adding a new image variant.

initializeUploadAssetAction() public method

Initialize property mapping as the upload usually comes from the Inspector JavaScript

masterPluginsAction() public method

Fetch all master plugins that are available in the current workspace.
public masterPluginsAction ( string $workspaceName = 'live', array $dimensions = [] ) : string
$workspaceName string Name of the workspace to use for querying the node
$dimensions array Optional list of dimensions and their values which should be used for querying the specified node
return string JSON encoded array of node path => label

pluginViewsAction() public method

Fetch the configured views for the given master plugin
public pluginViewsAction ( string $identifier = null, string $workspaceName = 'live', array $dimensions = [] ) : string
$identifier string Specifies the node to look up
$workspaceName string Name of the workspace to use for querying the node
$dimensions array Optional list of dimensions and their values which should be used for querying the specified node
return string

uploadAssetAction() public method

Depending on the $metadata argument it will return asset metadata for the AssetEditor or image metadata for the ImageEditor
public uploadAssetAction ( Asset $asset, string $metadata ) : string
$asset Neos\Media\Domain\Model\Asset
$metadata string Type of metadata to return ("Asset" or "Image")
return string

Property Details

$assetCollectionRepository protected_oe property

protected AssetCollectionRepository,Neos\Media\Domain\Repository $assetCollectionRepository
return Neos\Media\Domain\Repository\AssetCollectionRepository

$assetRepository protected_oe property

protected AssetRepository,Neos\Media\Domain\Repository $assetRepository
return Neos\Media\Domain\Repository\AssetRepository

$entityToIdentityConverter protected_oe property

protected EntityToIdentityConverter,Neos\Neos\TypeConverter $entityToIdentityConverter
return Neos\Neos\TypeConverter\EntityToIdentityConverter

$imageInterfaceArrayPresenter protected_oe property

protected ImageInterfaceArrayPresenter,Neos\Media\TypeConverter $imageInterfaceArrayPresenter
return Neos\Media\TypeConverter\ImageInterfaceArrayPresenter

$imageRepository protected_oe property

protected ImageRepository,Neos\Media\Domain\Repository $imageRepository
return Neos\Media\Domain\Repository\ImageRepository

$persistenceManager protected_oe property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
return Neos\Flow\Persistence\PersistenceManagerInterface

$pluginService protected_oe property

The pluginService
protected PluginService,Neos\Neos\Service $pluginService
return Neos\Neos\Service\PluginService

$resourceManager protected_oe property

protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager
return Neos\Flow\ResourceManagement\ResourceManager

$siteRepository protected_oe property

protected SiteRepository,Neos\Neos\Domain\Repository $siteRepository
return Neos\Neos\Domain\Repository\SiteRepository

$thumbnailService protected_oe property

protected ThumbnailService,Neos\Media\Domain\Service $thumbnailService
return Neos\Media\Domain\Service\ThumbnailService