ContentController
class ContentController extends ActionController (View source)
The Neos ContentModule controller; providing backend functionality for the Content Module.
Traits
A trait to add backend translation based on the backend users settings
Properties
protected Service | $localizationService | from BackendUserTranslationTrait | |
protected UserService | $userService | from BackendUserTranslationTrait | |
protected AssetRepository | $assetRepository | ||
protected ImageRepository | $imageRepository | ||
protected PersistenceManagerInterface | $persistenceManager | ||
protected ResourceManager | $resourceManager | ||
protected PluginService | $pluginService | The pluginService |
|
protected ImageInterfaceArrayPresenter | $imageInterfaceArrayPresenter | ||
protected EntityToIdentityConverter | $entityToIdentityConverter | ||
protected ThumbnailService | $thumbnailService | ||
protected PropertyMapper | $propertyMapper | ||
protected | $contentRepositoryRegistry |
Methods
Set the locale according to the user settings
Initialize property mapping as the upload usually comes from the Inspector JavaScript
Upload a new image, and return its metadata.
Configure property mapping for adding a new image variant.
Returns important meta data for the given object implementing ImageInterface.
No description
Fetch the metadata for multiple assets
Fetch the configured views for the given master plugin
Fetch all master plugins that are available in the current workspace.
No description
Signals that a new asset has been uploaded through the Neos Backend
Details
protected void
initializeObject()
Set the locale according to the user settings
void
initializeUploadAssetAction()
Initialize property mapping as the upload usually comes from the Inspector JavaScript
string
uploadAssetAction(Asset $asset, string $metadata, string $node, string $propertyName)
Upload a new image, and return its metadata.
Depending on the $metadata argument it will return asset metadata for the AssetEditor or image metadata for the ImageEditor
Note: This action triggers the AssetUploaded signal that can be used to adjust the asset based on the (site) node it was attached to.
void
initializeCreateImageVariantAction()
Configure property mapping for adding a new image variant.
string
createImageVariantAction(ImageVariant $asset)
Generate a new image variant from given data.
string
imageWithMetadataAction(ImageInterface $image)
Fetch the metadata for a given image
protected array<string,mixed>
getImageInterfacePreviewData(ImageInterface $image)
Returns important meta data for the given object implementing ImageInterface.
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 array
getImagePreviewData(Image $image)
No description
protected array<string,mixed>
getImageVariantPreviewData(ImageVariant $imageVariant)
No description
protected void
initializeAssetsWithMetadataAction()
No description
string
assetsWithMetadataAction(array $assets)
Fetch the metadata for multiple assets
protected array<string,mixed>
getAssetProperties(AssetInterface $asset)
No description
string
pluginViewsAction(string $identifier = null, string $workspaceName = 'live', array $dimensions = [])
Fetch the configured views for the given master plugin
string
masterPluginsAction(string $workspaceName = 'live', array $dimensions = [])
Fetch all master plugins that are available in the current workspace.
final protected Node|null
findClosestDocumentNode(Node $node)
No description
protected void
emitAssetUploaded(Asset $asset, Node|null $node, string $propertyName)
Signals that a new asset has been uploaded through the Neos Backend