AssetController
class AssetController extends ActionController (View source)
Controller for asset handling
Traits
A trait to add backend translation based on the backend users settings
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 Translator | $_translator | from AddFlashMessageTrait | |
protected array | $viewFormatToObjectNameMap | ||
protected SiteRepository | $siteRepository | ||
protected DomainRepository | $domainRepository | ||
protected AssetRepository | $assetRepository | ||
protected TagRepository | $tagRepository | ||
protected AssetCollectionRepository | $assetCollectionRepository | ||
protected PackageManager | $packageManager | ||
protected BrowserState | $browserState | ||
protected AssetService | $assetService | ||
protected AssetSourceService | $assetSourceService | ||
protected AssetSourceInterface[] | $assetSources | ||
protected array | $imageProfilesConfiguration |
Methods
No description
Add a translated flashMessage.
No description
Set common variables on the view
List existing assets
New asset form
Show an asset
Edit an asset
Display variants of an asset
No description
Initialization for createAction
Initialization for uploadAction
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.
No description
No description
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
void
initializeObject()
No description
void
addFlashMessage(string $messageBody, string $messageTitle = '', string $severity = Message::SEVERITY_OK, array $messageArguments = [], int $messageCode = null)
Add a translated flashMessage.
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 assets
void
newAction()
New asset form
void
replaceAssetResourceAction(Asset $asset)
No description
void
showAction(string $assetSourceIdentifier, string $assetProxyIdentifier)
Show an asset
void
editAction(string $assetSourceIdentifier, string $assetProxyIdentifier)
Edit an asset
void
variantsAction(string $assetSourceIdentifier, string $assetProxyIdentifier, string $overviewAction)
Display variants of an asset
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.