/**
  * Edit category
  *
  * @param integer $categoryId
  * @param array $categoryInfo
  *      string name
  * @return boolean|string
  */
 public function editCategory($categoryId, array $categoryInfo)
 {
     try {
         $this->adapter->getDriver()->getConnection()->beginTransaction();
         $update = $this->update()->table('miniphotogallery_category')->set($categoryInfo)->where(['id' => $categoryId, 'language' => $this->getCurrentLanguage()]);
         $statement = $this->prepareStatementForSqlObject($update);
         $statement->execute();
         $this->adapter->getDriver()->getConnection()->commit();
     } catch (Exception $e) {
         $this->adapter->getDriver()->getConnection()->rollback();
         ApplicationErrorLogger::log($e);
         return $e->getMessage();
     }
     // fire the edit category event
     MiniPhotoGalleryEvent::fireEditCategoryEvent($categoryId);
     return true;
 }