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
A trait to add create a content context
Properties
protected Service | $_localizationService | from BackendUserTranslationTrait | |
protected UserService | $_userService | from BackendUserTranslationTrait | |
protected ContentContextFactory | $_contextFactory | from CreateContentContextTrait | |
protected SiteRepository | $_siteRepository | from CreateContentContextTrait | |
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 |
Methods
Set the locale according to the user settings
Create a ContentContext based on the given workspace name
Generates a Context that exactly fits the given NodeData Workspace, Dimensions & Site.
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.
Signals that a new asset has been uploaded through the Neos Backend
Details
protected void
initializeObject()
Set the locale according to the user settings
protected ContentContext
createContentContext(string $workspaceName, array $dimensions = [])
Create a ContentContext based on the given workspace name
protected ContentContext
createContextMatchingNodeData(NodeData $nodeData)
Generates a Context that exactly fits the given NodeData Workspace, Dimensions & Site.
initializeUploadAssetAction()
Initialize property mapping as the upload usually comes from the Inspector JavaScript
string
uploadAssetAction(Asset $asset, string $metadata, NodeInterface $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
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
getImageVariantPreviewData(ImageVariant $imageVariant)
No description
protected void
initializeAssetsWithMetadataAction()
No description
string
assetsWithMetadataAction(array $assets)
Fetch the metadata for multiple assets
protected array
getAssetProperties(Asset $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.
protected void
emitAssetUploaded(Asset $asset, NodeInterface $node, string $propertyName)
Signals that a new asset has been uploaded through the Neos Backend