ImageController
class ImageController extends AssetController (View source)
Controller for browsing images in the ImageEditor
Traits
A trait to add backend translation based on the backend users settings
A trait to add create a content context
A trait to add backend translation based on the backend users settings
Constants
protected TAG_GIVEN |
|
protected TAG_ALL |
|
protected TAG_NONE |
|
protected COLLECTION_GIVEN |
|
protected COLLECTION_ALL |
|
Properties
protected Service | $_localizationService | from BackendUserTranslationTrait | |
protected UserService | $_userService | from BackendUserTranslationTrait | |
protected ContentContextFactory | $_contextFactory | from CreateContentContextTrait | |
protected SiteRepository | $_siteRepository | from CreateContentContextTrait | |
protected Translator | $_translator | from AddTranslatedFlashMessageTrait | |
protected array | $viewFormatToObjectNameMap | from AssetController | |
protected SiteRepository | $siteRepository | from AssetController | |
protected DomainRepository | $domainRepository | from AssetController | |
protected ImageRepository | $assetRepository | ||
protected TagRepository | $tagRepository | from AssetController | |
protected AssetCollectionRepository | $assetCollectionRepository | from AssetController | |
protected PackageManager | $packageManager | from AssetController | |
protected BrowserState | $browserState | from AssetController | |
protected AssetService | $assetService | from AssetController | |
protected AssetSourceService | $assetSourceService | from AssetController | |
protected AssetVariantGenerator | $assetVariantGenerator | from AssetController | |
protected AssetSourceInterface[] | $assetSources | from AssetController | |
protected array | $imageProfilesConfiguration | from AssetController | |
protected ImportedAssetRepository | $importedAssetRepository |
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.
No description
List existing images
Show an asset
No description
Display variants of an asset
Create missing variants for the given image
Upload a new asset. No redirection and no response body, for use by plupload (or similar).
Adds an asset to an asset collection
Update the resource on an asset.
This custom errorAction adds FlashMessages for validation results to give more information in the
Individual error FlashMessage that hides which action fails in production.
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.
void
addTranslatedFlashMessage(string $messageBodyTranslationId, string $severity = Message::SEVERITY_OK, array $messageArguments = [], int|null $messageCode = null)
No description
protected void
initializeAction()
No description
protected void
initializeView(ViewInterface $view)
Set common variables on the view
void
indexAction(string $view = null, string $sortBy = null, string $sortDirection = null, string $filter = null, int $tagMode = self::TAG_GIVEN, Tag $tag = null, string $searchTerm = null, int $collectionMode = self::COLLECTION_GIVEN, AssetCollection $assetCollection = null, string $assetSourceIdentifier = null)
List existing images
void
newAction()
New asset form
void
replaceAssetResourceAction(Asset $asset)
No description
void
showAction(string $assetSourceIdentifier, string $assetProxyIdentifier)
Show an asset
void
editAction(string $assetSourceIdentifier = null, string $assetProxyIdentifier = null, AssetInterface $asset = null)
No description
void
variantsAction(string $assetSourceIdentifier, string $assetProxyIdentifier, string $overviewAction)
Display variants of an asset
void
createVariantsAction(string $assetSourceIdentifier, string $assetProxyIdentifier, string $overviewAction)
Create missing variants for the given image
protected void
initializeUpdateAction()
No description
void
updateAction(Asset $asset)
Update an asset
protected void
initializeCreateAction()
Initialization for createAction
void
createAction(Asset $asset)
Create a new asset
protected void
initializeUploadAction()
Initialization for uploadAction
string
uploadAction(Asset $asset)
Upload a new asset. No redirection and no response body, for use by plupload (or similar).
void
tagAssetAction(Asset $asset, Tag $tag)
Tags an asset with a tag.
No redirection and no response body, no flash message, for use by plupload (or similar).
void
addAssetToCollectionAction(Asset $asset, AssetCollection $assetCollection)
Adds an asset to an asset collection
void
deleteAction(Asset $asset)
Delete an asset
void
updateAssetResourceAction(AssetInterface $asset, PersistentResource $resource, array $options = [])
Update the resource on an asset.
void
relatedNodesAction(AssetInterface $asset)
Get Related Nodes for an asset (proxy action)
void
createTagAction(string $label)
No description
void
editTagAction(Tag $tag)
No description
void
updateTagAction(Tag $tag)
No description
void
deleteTagAction(Tag $tag)
No description
void
createAssetCollectionAction(string $title)
No description
void
editAssetCollectionAction(AssetCollection $assetCollection)
No description
void
updateAssetCollectionAction(AssetCollection $assetCollection)
No description
void
deleteAssetCollectionAction(AssetCollection $assetCollection)
No description
protected string
errorAction()
This custom errorAction adds FlashMessages for validation results to give more information in the
protected Message|bool
getErrorFlashMessage()
Individual error FlashMessage that hides which action fails in production.