public function getAllTagsForFile(File $file) { $list = array(); foreach ($file->getTags() as $tag) { $list = $this->collectTagsByParent($tag, $list); } return $list; }
public function canRemoveTag(File $file, Tag $tag) { $tags = $file->getTags(); foreach ($tags as $aTag) { if ($aTag->getId() == $tag->getId()) { return true; } } return false; }