public function renderToolTemplateContentFiltersSitesAction()
    {
        $translator = $this->getServiceLocator()->get('translator');
        $siteTable = $this->getServiceLocator()->get('MelisEngineTableSite');

        $sites = array();
        $sites[] = '<option value="">'. $translator->translate('tr_meliscms_tool_templates_tpl_label_choose') .'</option>';

       foreach($siteTable->fetchAll() as $site){
           $siteName = !empty($site->site_label) ? $site->site_label : $site->site_name;
           $sites[] = '<option value="'.$site->site_id.'">'. $siteName .'</option>';
       }

       $view = new ViewModel();
       $view->sites = $sites;
       return $view;
    }
public function renderToolTemplateContentFiltersSitesAction()
    {
        $translator = $this->getServiceLocator()->get('translator');
        $siteTable = $this->getServiceLocator()->get('MelisEngineTableSite');

        $sites = array();
        $sites[] = '<option value="">'. $translator->translate('tr_meliscms_tool_templates_tpl_label_choose') .'</option>';

       foreach($siteTable->fetchAll() as $site){
           $siteName = !empty($site->site_label) ? $site->site_label : $site->site_name;
           $sites[] = '<option value="'.$site->site_id.'">'. $siteName .'</option>';
       }

       $view = new ViewModel();
       $view->sites = $sites;
       return $view;
    }
public function renderToolTemplateContentFiltersSitesAction ( ) { $ translator = $ this -> getServiceLocator ( ) -> get ( 'translator' ) ; $ siteTable = $ this -> getServiceLocator ( ) -> get ( 'MelisEngineTableSite' ) ; $ sites = array ( ) ; $ sites [ ] = '<option value="">' . $ translator -> translate ( 'tr_meliscms_tool_templates_tpl_label_choose' ) . '</option>' ; foreach ( $ siteTable -> fetchAll ( ) as $ site ) { $ siteName = ! empty ( $ site -> site_label ) ? $ site -> site_label : $ site -> site_name ; $ sites [ ] = '<option value="' . $ site -> site_id . '">' . $ siteName . '</option>' ; } $ view = new ViewModel ( ) ; $ view -> sites = $ sites ; return $ view ; }
Renders to the site filter selection in the filter bar in the datatable
@return \Zend\View\Model\ViewModel
Renders to the site filter selection in the filter bar in the datatable