PHP Class Neos\Media\Browser\Controller\AssetController

Inheritance: extends Neos\Flow\Mvc\Controller\ActionController
Exibir arquivo Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$assetCollectionRepository Neos\Media\Domain\Repository\AssetCollectionRepository
$assetRepository Neos\Media\Domain\Repository\AssetRepository
$assetService Neos\Media\Domain\Service\AssetService
$browserState Neos\Media\Domain\Session\BrowserState
$packageManager Neos\Flow\Package\PackageManagerInterface
$tagRepository Neos\Media\Domain\Repository\TagRepository
$translator Neos\Flow\I18n\Translator
$viewFormatToObjectNameMap array

Public Methods

Method Description
addAssetToCollectionAction ( Asset $asset, AssetCollection $assetCollection ) : boolean Adds an asset to an asset collection
addFlashMessage ( string $messageBody, string $messageTitle = '', string $severity = Message::SEVERITY_OK, array $messageArguments = [], integer $messageCode = null ) : void Add a translated flashMessage.
createAction ( Asset $asset ) : void Create a new asset
createAssetCollectionAction ( string $title ) : void
createTagAction ( string $label ) : void
deleteAction ( Asset $asset ) : void Delete an asset
deleteAssetCollectionAction ( AssetCollection $assetCollection ) : void
deleteTagAction ( Tag $tag ) : void
editAction ( Asset $asset ) : void Edit an asset
editAssetCollectionAction ( AssetCollection $assetCollection ) : void
editTagAction ( Tag $tag ) : void
indexAction ( string $view = null, string $sortBy = null, string $sortDirection = null, string $filter = null, integer $tagMode = self::TAG_GIVEN, Tag $tag = null, string $searchTerm = null, integer $collectionMode = self::COLLECTION_GIVEN, AssetCollection $assetCollection = null ) : void List existing assets
newAction ( ) : void New asset form
replaceAssetResourceAction ( Asset $asset ) : void
tagAssetAction ( Asset $asset, Tag $tag ) : boolean Tags an asset with a tag.
updateAction ( Asset $asset ) : void Update an asset
updateAssetCollectionAction ( AssetCollection $assetCollection ) : void
updateAssetResourceAction ( Neos\Media\Domain\Model\AssetInterface $asset, PersistentResource $resource, array $options = [] ) : void Replace the resource on an asset.
updateTagAction ( Tag $tag ) : void
uploadAction ( Asset $asset ) : string Upload a new asset. No redirection and no response body, for use by plupload (or similar).

Protected Methods

Method Description
initializeCreateAction ( ) : void Initialization for createAction
initializeUpdateAction ( ) : void
initializeUploadAction ( ) : void Initialization for uploadAction
initializeView ( Neos\Flow\Mvc\View\ViewInterface $view ) : void Set common variables on the view
maximumFileUploadSize ( ) : integer Returns the lowest configured maximum upload file size

Method Details

addAssetToCollectionAction() public method

Adds an asset to an asset collection
public addAssetToCollectionAction ( Asset $asset, AssetCollection $assetCollection ) : boolean
$asset Neos\Media\Domain\Model\Asset
$assetCollection Neos\Media\Domain\Model\AssetCollection
return boolean

addFlashMessage() public method

Add a translated flashMessage.
public addFlashMessage ( string $messageBody, string $messageTitle = '', string $severity = Message::SEVERITY_OK, array $messageArguments = [], integer $messageCode = null ) : void
$messageBody string The translation id for the message body.
$messageTitle string The translation id for the message title.
$severity string
$messageArguments array
$messageCode integer
return void

createAction() public method

Create a new asset
public createAction ( Asset $asset ) : void
$asset Neos\Media\Domain\Model\Asset
return void

createAssetCollectionAction() public method

public createAssetCollectionAction ( string $title ) : void
$title string
return void

createTagAction() public method

public createTagAction ( string $label ) : void
$label string
return void

deleteAction() public method

Delete an asset
public deleteAction ( Asset $asset ) : void
$asset Neos\Media\Domain\Model\Asset
return void

deleteAssetCollectionAction() public method

public deleteAssetCollectionAction ( AssetCollection $assetCollection ) : void
$assetCollection Neos\Media\Domain\Model\AssetCollection
return void

deleteTagAction() public method

public deleteTagAction ( Tag $tag ) : void
$tag Neos\Media\Domain\Model\Tag
return void

editAction() public method

Edit an asset
public editAction ( Asset $asset ) : void
$asset Neos\Media\Domain\Model\Asset
return void

editAssetCollectionAction() public method

public editAssetCollectionAction ( AssetCollection $assetCollection ) : void
$assetCollection Neos\Media\Domain\Model\AssetCollection
return void

editTagAction() public method

public editTagAction ( Tag $tag ) : void
$tag Neos\Media\Domain\Model\Tag
return void

indexAction() public method

List existing assets
public indexAction ( string $view = null, string $sortBy = null, string $sortDirection = null, string $filter = null, integer $tagMode = self::TAG_GIVEN, Tag $tag = null, string $searchTerm = null, integer $collectionMode = self::COLLECTION_GIVEN, AssetCollection $assetCollection = null ) : void
$view string
$sortBy string
$sortDirection string
$filter string
$tagMode integer
$tag Neos\Media\Domain\Model\Tag
$searchTerm string
$collectionMode integer
$assetCollection Neos\Media\Domain\Model\AssetCollection
return void

initializeCreateAction() protected method

Initialization for createAction
protected initializeCreateAction ( ) : void
return void

initializeUpdateAction() protected method

protected initializeUpdateAction ( ) : void
return void

initializeUploadAction() protected method

Initialization for uploadAction
protected initializeUploadAction ( ) : void
return void

initializeView() protected method

Set common variables on the view
protected initializeView ( Neos\Flow\Mvc\View\ViewInterface $view ) : void
$view Neos\Flow\Mvc\View\ViewInterface
return void

maximumFileUploadSize() protected method

Returns the lowest configured maximum upload file size
protected maximumFileUploadSize ( ) : integer
return integer

newAction() public method

New asset form
public newAction ( ) : void
return void

replaceAssetResourceAction() public method

public replaceAssetResourceAction ( Asset $asset ) : void
$asset Neos\Media\Domain\Model\Asset
return void

tagAssetAction() public method

No redirection and no response body, no flash message, for use by plupload (or similar).
public tagAssetAction ( Asset $asset, Tag $tag ) : boolean
$asset Neos\Media\Domain\Model\Asset
$tag Neos\Media\Domain\Model\Tag
return boolean

updateAction() public method

Update an asset
public updateAction ( Asset $asset ) : void
$asset Neos\Media\Domain\Model\Asset
return void

updateAssetCollectionAction() public method

public updateAssetCollectionAction ( AssetCollection $assetCollection ) : void
$assetCollection Neos\Media\Domain\Model\AssetCollection
return void

updateAssetResourceAction() public method

Replace the resource on an asset.
public updateAssetResourceAction ( Neos\Media\Domain\Model\AssetInterface $asset, PersistentResource $resource, array $options = [] ) : void
$asset Neos\Media\Domain\Model\AssetInterface
$resource Neos\Flow\ResourceManagement\PersistentResource
$options array
return void

updateTagAction() public method

public updateTagAction ( Tag $tag ) : void
$tag Neos\Media\Domain\Model\Tag
return void

uploadAction() public method

Upload a new asset. No redirection and no response body, for use by plupload (or similar).
public uploadAction ( Asset $asset ) : string
$asset Neos\Media\Domain\Model\Asset
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

$assetService protected_oe property

protected AssetService,Neos\Media\Domain\Service $assetService
return Neos\Media\Domain\Service\AssetService

$browserState protected_oe property

protected BrowserState,Neos\Media\Domain\Session $browserState
return Neos\Media\Domain\Session\BrowserState

$packageManager protected_oe property

protected PackageManagerInterface,Neos\Flow\Package $packageManager
return Neos\Flow\Package\PackageManagerInterface

$tagRepository protected_oe property

protected TagRepository,Neos\Media\Domain\Repository $tagRepository
return Neos\Media\Domain\Repository\TagRepository

$translator protected_oe property

protected Translator,Neos\Flow\I18n $translator
return Neos\Flow\I18n\Translator

$viewFormatToObjectNameMap protected_oe property

protected array $viewFormatToObjectNameMap
return array