File modules/cms/action/languagelist/LanguagelistEditAction.class.php
Last commit: Thu Nov 19 12:36:44 2020 +0100 Jan Dankert Fix: nextSubAction() is depracated and should not be used.
1 <?php 2 namespace cms\action\languagelist; 3 use cms\action\LanguagelistAction; 4 use cms\action\Method; 5 use cms\base\Configuration; 6 use cms\model\Language; 7 use util\Html; 8 9 10 class LanguagelistEditAction extends LanguagelistAction implements Method { 11 12 public function view() { 13 $countryList = Configuration::Conf()->get('countries',[]); 14 15 $list = array(); 16 17 $this->setTemplateVar('act_languageid',0 ); 18 19 20 21 foreach( $this->project->getLanguageIds() as $id ) 22 { 23 $l = new Language( $id ); 24 $l->load(); 25 26 unset( $countryList[strtoupper($l->isoCode)] ); 27 28 $list[$id] = array(); 29 $list[$id]['name' ] = $l->name; 30 $list[$id]['isocode'] = $l->isoCode; 31 $list[$id]['id' ] = $id; 32 33 $list[$id]['is_default'] = $l->isDefault; 34 35 $list[$id]['select_url'] = Html::url( 'index','language',$id ); 36 } 37 38 $this->setTemplateVar('el',$list); 39 } 40 41 public function post() { 42 } 43 }
Downloadmodules/cms/action/languagelist/LanguagelistEditAction.class.php
History Thu, 19 Nov 2020 12:36:44 +0100 Jan Dankert Fix: nextSubAction() is depracated and should not be used. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.