Neos.Media/Classes/Domain/Model/Tag.php
public function setAssetCollections(Collection $assetCollections)
    {
        foreach ($this->assetCollections as $existingAssetCollection) {
            $existingAssetCollection->removeTag($this);
        }
        foreach ($assetCollections as $newAssetCollection) {
            $newAssetCollection->addTag($this);
        }
        foreach ($this->assetCollections as $assetCollection) {
            if (!$assetCollections->contains($assetCollection)) {
                $assetCollections->add($assetCollection);
            }
        }
        $this->assetCollections = $assetCollections;
    }
public function setAssetCollections(Collection $assetCollections)
    {
        foreach ($this->assetCollections as $existingAssetCollection) {
            $existingAssetCollection->removeTag($this);
        }
        foreach ($assetCollections as $newAssetCollection) {
            $newAssetCollection->addTag($this);
        }
        foreach ($this->assetCollections as $assetCollection) {
            if (!$assetCollections->contains($assetCollection)) {
                $assetCollections->add($assetCollection);
            }
        }
        $this->assetCollections = $assetCollections;
    }
public function setAssetCollections ( Collection $ assetCollections ) { foreach ( $ this -> assetCollections as $ existingAssetCollection ) { $ existingAssetCollection -> removeTag ( $ this ) ; } foreach ( $ assetCollections as $ newAssetCollection ) { $ newAssetCollection -> addTag ( $ this ) ; } foreach ( $ this -> assetCollections as $ assetCollection ) { if ( ! $ assetCollections -> contains ( $ assetCollection ) ) { $ assetCollections -> add ( $ assetCollection ) ; } } $ this -> assetCollections = $ assetCollections ; }
Set the asset collections that include this tag

@param Collection $assetCollections
@return void
Set the asset collections that include this tag