/**
  * Add a new category
  *
  * @param array $categoryInfo
  *      string name
  * @return boolean|string
  */
 public function addCategory(array $categoryInfo)
 {
     try {
         $this->adapter->getDriver()->getConnection()->beginTransaction();
         $insert = $this->insert()->into('miniphotogallery_category')->values(array_merge($categoryInfo, ['language' => $this->getCurrentLanguage()]));
         $statement = $this->prepareStatementForSqlObject($insert);
         $statement->execute();
         $insertId = $this->adapter->getDriver()->getLastGeneratedValue();
         $this->adapter->getDriver()->getConnection()->commit();
     } catch (Exception $e) {
         $this->adapter->getDriver()->getConnection()->rollback();
         ApplicationErrorLogger::log($e);
         return $e->getMessage();
     }
     // fire the add category event
     MiniPhotoGalleryEvent::fireAddCategoryEvent($insertId);
     return true;
 }