Find Assets with the given Tag assigned
public findByTag ( |
||
$tag | ||
$assetCollection | ||
return | Neos\Flow\Persistence\QueryResultInterface |
/** * @param Tag $tag * @return void */ public function deleteTagAction(Tag $tag) { $taggedAssets = $this->assetRepository->findByTag($tag); foreach ($taggedAssets as $asset) { $asset->removeTag($tag); $this->assetRepository->update($asset); } $this->tagRepository->remove($tag); $this->addFlashMessage('tagHasBeenDeleted', '', Message::SEVERITY_OK, [htmlspecialchars($tag->getLabel())]); $this->redirect('index'); }