getData(); $type = $data['type']; } return $type; } public function getAlbumsArray(){ $ac = array(); $albums = Mage::getModel('gallery/toitgallery')->getAllAlbums(); $ac[0] = array('value'=>1, 'label'=>Mage::helper('gallery')->__('Root')); foreach($albums as $key=>$album){ $level = $album->getData('level'); $tabs=""; for($i=0;$i<$level;$i++) $tabs .= "-"; $ac[] = array('value'=>$album->getGalleryId(), 'label'=>$tabs.$album->getTitle()); } return $ac; } public function getAlbumsArrayGrid(){ $ac = array(); $albums = Mage::getModel('gallery/toitgallery')->getAllAlbums(); $ac[1] = Mage::helper('gallery')->__('Root'); foreach($albums as $key=>$album){ $level = $album->getData('level'); $tabs=""; for($i=0;$i<$level;$i++) $tabs .= "-"; $ac[$album->getGalleryId()] = $tabs.$album->getTitle(); } return $ac; } }