Esempio n. 1
0
 /**
  * Removes child albums that belong to provided id
  * 
  * @param string $parentId
  * @return boolean
  */
 private function removeChildAlbumsByParentId($parentId)
 {
     $treeBuilder = new TreeBuilder($this->albumMapper->fetchAll());
     $ids = $treeBuilder->findChildNodeIds($parentId);
     // If there's at least one child id, then start working next
     if (!empty($ids)) {
         foreach ($ids as $id) {
             $this->removeAlbumById($id);
         }
     }
     return true;
 }