Neos.Media.Browser/Classes/Controller/AssetController.php
public function createAction(Asset $asset): void
    {
        if ($this->persistenceManager->isNewObject($asset)) {
            $this->assetRepository->add($asset);
        }
        $this->addFlashMessage('assetHasBeenAdded', '', Message::SEVERITY_OK, [htmlspecialchars($asset->getLabel())]);
        $this->redirect('index');
    }
public function createAction(Asset $asset): void
    {
        if ($this->persistenceManager->isNewObject($asset)) {
            $this->assetRepository->add($asset);
        }
        $this->addFlashMessage('assetHasBeenAdded', '', Message::SEVERITY_OK, [htmlspecialchars($asset->getLabel())]);
        $this->redirect('index');
    }
public function createAction ( Asset $ asset ) : void { if ( $ this -> persistenceManager -> isNewObject ( $ asset ) ) { $ this -> assetRepository -> add ( $ asset ) ; } $ this -> addFlashMessage ( 'assetHasBeenAdded' , '' , Message :: SEVERITY_OK , [ htmlspecialchars ( $ asset -> getLabel ( ) ) ] ) ; $ this -> redirect ( 'index' ) ; }
Create a new asset

@param Asset $asset
@return void
@throws StopActionException
@throws IllegalObjectTypeException
Create a new asset