/**
  * init the gallery framework by type name
  */
 protected static function initGalleryFramework($galleryTypeName, $galleryID = "")
 {
     $objGallery = "";
     if (!empty($galleryID)) {
         $objGallery = new UniteGalleryGallery();
         $objGallery->initByID($galleryID);
         $galleryTypeName = $objGallery->getTypeName();
     }
     UniteFunctionsUG::validateNotEmpty($galleryTypeName, "Gallery Type Name");
     $galleries = new UniteGalleryGalleries();
     self::$currentGalleryType = new UniteGalleryGalleryType();
     self::$currentGalleryType = $galleries->getGalleryTypeByName($galleryTypeName);
     GlobalsUGGallery::init(self::$currentGalleryType, $objGallery, $galleryID);
 }
 /**
  * 
  * init function
  */
 public function init()
 {
     parent::init();
     self::addMenuPage('Unite Gallery', "adminPages");
     self::addSubMenuPage("galleries", __('Galleries', UNITEGALLERY_TEXTDOMAIN), "adminPages");
     self::addSubMenuPage("items", __('Items', UNITEGALLERY_TEXTDOMAIN), "adminPages");
     //add internal hook for adding a menu in arrMenus
     self::addAction(self::ACTION_ADMIN_MENU, "addAdminMenu");
     //if not inside plugin don't continue
     if ($this->isInsidePlugin() == true) {
         self::addAction(self::ACTION_ADD_SCRIPTS, "onAddScripts");
         self::addAction(self::ACTION_PRINT_SCRIPT, "onPrintFooterScripts");
     }
     $this->addEvent_onActivate();
     self::addActionAjax("ajax_action", "onAjaxAction");
 }