function _render_nextgen_pro_albums_display_type_field($display_type)
 {
     $mapper = C_Display_Type_Mapper::get_instance();
     $types = array();
     foreach ($mapper->find_by_entity_type('image') as $dt) {
         $types[$dt->name] = $dt->title;
     }
     return $this->_render_select_field($display_type, 'gallery_display_type', __('Display galleries as', 'nextgen-gallery-pro'), $types, $display_type->settings['gallery_display_type'], __('How would you like galleries to be displayed?', 'nextgen-gallery-pro'));
 }
 function uninstall($hard = FALSE)
 {
     if ($hard) {
         $mapper = C_Display_Type_Mapper::get_instance();
         if ($entity = $mapper->find_by_name(NEXTGEN_ROYALSLIDER_MODULE_NAME)) {
             $mapper->destroy($entity);
         }
     }
 }
 function uninstall($hard = FALSE)
 {
     $mapper = C_Display_Type_Mapper::get_instance();
     if ($entity = $mapper->find_by_name(NGG_PRO_SLIDESHOW)) {
         if ($hard) {
             $mapper->destroy($entity);
         } else {
             $entity->hidden_from_ui = TRUE;
             $mapper->save($entity);
         }
     }
 }
 function uninstall($hard)
 {
     $mapper = C_Display_Type_Mapper::get_instance();
     if ($entity = $mapper->find_by_name(NGG_PRO_HORIZONTAL_FILMSTRIP)) {
         if ($hard) {
             $mapper->destroy($entity);
         } else {
             $entity->hidden_from_ui = TRUE;
             $mapper->save($entity);
         }
     }
 }
 public function _render_nextgen_basic_tagcloud_display_type_field($display_type)
 {
     $types = array();
     $skip_types = array('photocrati-nextgen_basic_tagcloud', 'photocrati-nextgen_basic_singlepic');
     $mapper = C_Display_Type_Mapper::get_instance();
     $display_types = $mapper->find_all();
     foreach ($display_types as $dt) {
         if (in_array($dt->name, $skip_types)) {
             continue;
         }
         $types[$dt->name] = str_replace('NextGEN Basic ', '', $dt->title);
     }
     return $this->_render_select_field($display_type, 'display_type', __('Display type', 'nggallery'), $types, $display_type->settings['display_type'], __('The display type that the tagcloud will point its results to', 'nggallery'));
 }
 function uninstall($hard = TRUE)
 {
     $mapper = C_Display_Type_Mapper::get_instance();
     foreach (array(NGG_PRO_GRID_ALBUM, NGG_PRO_LIST_ALBUM) as $display_type_name) {
         if ($display_type = $mapper->find_by_name($display_type_name)) {
             if ($hard) {
                 $mapper->destroy($display_type);
             } else {
                 $display_type->hidden_from_ui = TRUE;
                 $mapper->save($display_type);
             }
         }
     }
 }
 /**
  * Renders the Gallery Display Type field
  * @param C_Display_Type $display_type
  */
 public function _render_nextgen_basic_album_gallery_display_type_field($display_type)
 {
     $mapper = C_Display_Type_Mapper::get_instance();
     return $this->render_partial('photocrati-nextgen_basic_album#nextgen_basic_album_gallery_display_type', array('display_type_name' => $display_type->name, 'gallery_display_type_label' => __('Display galleries as', 'nggallery'), 'gallery_display_type_help' => __('How would you like galleries to be displayed?', 'nggallery'), 'gallery_display_type' => $display_type->settings['gallery_display_type'], 'galleries_per_page_label' => __('Galleries per page', 'nggallery'), 'galleries_per_page' => $display_type->settings['galleries_per_page'], 'display_types' => $mapper->find_by_entity_type('image')), TRUE);
 }
 /**
  * Returns the rendered HTML of a gallery based on the provided tag
  *
  * @param string $tag
  * @return string
  */
 public function index_action($tag)
 {
     $mapper = C_Display_Type_Mapper::get_instance();
     // Respect the global display type setting
     $display_type = $mapper->find_by_name(NGG_BASIC_TAGCLOUD, TRUE);
     $display_type = !empty($display_type->settings['display_type']) ? $display_type->settings['display_type'] : NGG_BASIC_THUMBNAILS;
     return "[ngg_images source='tags' container_ids='{$tag}' slug='{$tag}' display_type='{$display_type}']";
 }
 /**
  * Uninstalls all display types
  */
 function uninstall_display_types()
 {
     $mapper = C_Display_Type_Mapper::get_instance();
     $mapper->delete()->run_query();
 }
 /**
  * Returns the model (display type) used in the form
  * @return stdClass
  */
 public function get_model()
 {
     if ($this->_model == null) {
         $mapper = C_Display_Type_Mapper::get_instance();
         $this->_model = $mapper->find_by_name($this->object->get_display_type_name(), TRUE);
     }
     return $this->_model;
 }