Пример #1
0
 /**
  * Removes all post images associated with category id
  * 
  * @param string $id Category's id
  * @return boolean
  */
 private function removeAllPostImagesByCategoryId($id)
 {
     $ids = $this->postMapper->fetchAllIdsWithImagesByCategoryId($id);
     // Do the work, in case there's at least one id
     if (!empty($ids)) {
         foreach ($ids as $id) {
             $this->imageManager->delete($id);
         }
     }
     return true;
 }