Neos.Media.Browser/Classes/Controller/AssetController.php
public function addAssetToCollectionAction(Asset $asset, AssetCollection $assetCollection): void
    {
        $success = false;
        if ($assetCollection->addAsset($asset)) {
            $this->assetCollectionRepository->update($assetCollection);
            $success = true;
        }
        $this->view->assign('value', $success);
    }
public function addAssetToCollectionAction(Asset $asset, AssetCollection $assetCollection): void
    {
        $success = false;
        if ($assetCollection->addAsset($asset)) {
            $this->assetCollectionRepository->update($assetCollection);
            $success = true;
        }
        $this->view->assign('value', $success);
    }
public function addAssetToCollectionAction ( Asset $ asset , AssetCollection $ assetCollection ) : void { $ success = false ; if ( $ assetCollection -> addAsset ( $ asset ) ) { $ this -> assetCollectionRepository -> update ( $ assetCollection ) ; $ success = true ; } $ this -> view -> assign ( 'value' , $ success ) ; }
Adds an asset to an asset collection

@param Asset $asset
@param AssetCollection $assetCollection
@return void
@throws IllegalObjectTypeException
Adds an asset to an asset collection