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