classes/BannerStatisticsHelper.php
protected function getBannerCategories($banner_number)
    {
        // Kat sammeln
        $objBannerCat = \Database::getInstance()
                            ->prepare("SELECT 
                                            id 
                                          , title 
                                       FROM 
                                            tl_banner_category 
                                        WHERE 
                                            id 
                                        IN 
                                            (SELECT 
                                                 pid
                                             FROM
                                                 tl_banner
                                             LEFT JOIN
                                                 tl_banner_category 
                                             ON 
                                                 tl_banner.pid = tl_banner_category.id
                                             GROUP BY 
                                                 tl_banner.pid
                                             )
                                        ORDER BY 
                                            title")
                            ->execute();
        
        if ($objBannerCat->numRows > 0)
        {
            if ($banner_number == 0)
            { // gewählte Kategorie hat keine Banner, es gibt aber weitere Kategorien
                $arrBannerCats[] = array
                (
                    'id'    => '0',
                    'title' => $GLOBALS['TL_LANG']['tl_banner_stat']['select']
                );
                $this->intCatID = 0; // template soll nichts anzeigen
            }
            $arrBannerCats[] = array
            (
                'id'    => '-1',
                'title' => $GLOBALS['TL_LANG']['tl_banner_stat']['allkat']
            );
            while ($objBannerCat->next())
            {
                $arrBannerCats[] = array
                (
                    'id'    => $objBannerCat->id,
                    'title' => $objBannerCat->title
                );
            }
        }
        else
        { // es gibt keine Kategorie mit Banner
            $arrBannerCats[] = array
            (
                'id'    => '0',
                'title' => '---------'
            );
        }
        return $arrBannerCats;
        
    }
protected function getBannerCategories($banner_number)
    {
        // Kat sammeln
        $objBannerCat = \Database::getInstance()
                            ->prepare("SELECT 
                                            id 
                                          , title 
                                       FROM 
                                            tl_banner_category 
                                        WHERE 
                                            id 
                                        IN 
                                            (SELECT 
                                                 pid
                                             FROM
                                                 tl_banner
                                             LEFT JOIN
                                                 tl_banner_category 
                                             ON 
                                                 tl_banner.pid = tl_banner_category.id
                                             GROUP BY 
                                                 tl_banner.pid
                                             )
                                        ORDER BY 
                                            title")
                            ->execute();
        
        if ($objBannerCat->numRows > 0)
        {
            if ($banner_number == 0)
            { // gewählte Kategorie hat keine Banner, es gibt aber weitere Kategorien
                $arrBannerCats[] = array
                (
                    'id'    => '0',
                    'title' => $GLOBALS['TL_LANG']['tl_banner_stat']['select']
                );
                $this->intCatID = 0; // template soll nichts anzeigen
            }
            $arrBannerCats[] = array
            (
                'id'    => '-1',
                'title' => $GLOBALS['TL_LANG']['tl_banner_stat']['allkat']
            );
            while ($objBannerCat->next())
            {
                $arrBannerCats[] = array
                (
                    'id'    => $objBannerCat->id,
                    'title' => $objBannerCat->title
                );
            }
        }
        else
        { // es gibt keine Kategorie mit Banner
            $arrBannerCats[] = array
            (
                'id'    => '0',
                'title' => '---------'
            );
        }
        return $arrBannerCats;
        
    }
protected function getBannerCategories ( $ banner_number ) { // Kat sammeln $ objBannerCat = \ Database :: getInstance ( ) -> prepare ( "SELECT 
                                            id 
                                          , title 
                                       FROM 
                                            tl_banner_category 
                                        WHERE 
                                            id 
                                        IN 
                                            (SELECT 
                                                 pid
                                             FROM
                                                 tl_banner
                                             LEFT JOIN
                                                 tl_banner_category 
                                             ON 
                                                 tl_banner.pid = tl_banner_category.id
                                             GROUP BY 
                                                 tl_banner.pid
                                             )
                                        ORDER BY 
                                            title" ) -> execute ( ) ; if ( $ objBannerCat -> numRows > 0 ) { if ( $ banner_number == 0 ) { // gewählte Kategorie hat keine Banner, es gibt aber weitere Kategorien $ arrBannerCats [ ] = array ( 'id' => '0' , 'title' => $ GLOBALS [ 'TL_LANG' ] [ 'tl_banner_stat' ] [ 'select' ] ) ; $ this -> intCatID = 0 ; // template soll nichts anzeigen } $ arrBannerCats [ ] = array ( 'id' => '-1' , 'title' => $ GLOBALS [ 'TL_LANG' ] [ 'tl_banner_stat' ] [ 'allkat' ] ) ; while ( $ objBannerCat -> next ( ) ) { $ arrBannerCats [ ] = array ( 'id' => $ objBannerCat -> id , 'title' => $ objBannerCat -> title ) ; } } else { // es gibt keine Kategorie mit Banner $ arrBannerCats [ ] = array ( 'id' => '0' , 'title' => '---------' ) ; } return $ arrBannerCats ; }
Get banner categories

@deprecated
@param     integer    $banner_number
@return    array      $arrBannerCats
Get banner categories