GrouplistShowAction.class.php (462B)
1 <?php 2 namespace cms\action\grouplist; 3 use cms\action\GrouplistAction; 4 use cms\action\Method; 5 use cms\model\Group; 6 7 class GrouplistShowAction extends GrouplistAction implements Method { 8 public function view() { 9 $list = array(); 10 11 foreach( Group::getAll() as $id=>$name ) 12 { 13 $list[$id] = array(); 14 $list[$id]['id' ] = $id; 15 $list[$id]['name'] = $name; 16 } 17 18 $this->setTemplateVar('el', $list); 19 } 20 21 22 public function post() { 23 } 24 }