objBrandModel->getGroupByFirstLetter(); } protected function deleteFileBeforeDeleteItem($item_id): bool { // delete thumb files $item_info = $this->getInfo($item_id); if($item_info['thumbnail']) { foreach (static::$resized_sizes as $size => $value) { $file_local_path = PUBLIC_DIR . "/". static::$image_folder . "/". $size. IMAGE_FILE_SEPARATOR . $item_info['thumbnail']; unlink($file_local_path); } // remove original file $file_local_path = PUBLIC_DIR . "/". static::$image_folder . "/". $item_info['thumbnail']; unlink($file_local_path); } //delete media files? // todo: // ok return true; } }