File modules/cms/action/grouplist/GrouplistAddAction.class.php

Last commit: Sun Mar 14 23:51:49 2021 +0100	Jan Dankert	Refactoring: Using the ValidationException where possible.
1 <?php 2 namespace cms\action\grouplist; 3 use cms\action\GrouplistAction; 4 use cms\action\Method; 5 use cms\model\Group; 6 use language\Messages; 7 8 class GrouplistAddAction extends GrouplistAction implements Method { 9 10 public function view() { 11 } 12 13 public function post() { 14 15 $this->group = new Group(); 16 $this->group->name = $this->request->getRequiredText('name'); 17 $this->group->persist(); 18 19 $this->addNoticeFor( $this->group, Messages::ADDED); 20 } 21 }
Download modules/cms/action/grouplist/GrouplistAddAction.class.php
History Sun, 14 Mar 2021 23:51:49 +0100 Jan Dankert Refactoring: Using the ValidationException where possible. Fri, 26 Feb 2021 01:06:01 +0100 Jan Dankert Refactoring accessing the request parameter values. Thu, 19 Nov 2020 14:49:58 +0100 Jan Dankert Fix: Action::addNotice() is replaced by Action::addNoticeFor() Thu, 19 Nov 2020 12:36:44 +0100 Jan Dankert Fix: nextSubAction() is depracated and should not be used. Wed, 18 Nov 2020 01:46:36 +0100 Jan Dankert Refactoring of model classes: New method persist() and some other cleanups. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.