File modules/cms/action/text/TextValueAction.class.php
Last commit: Wed Mar 9 13:28:52 2022 +0100 dankert Refactoring: Checkbox values are always sent to the server. In the actions we must test the value with 'isTrue()'
1 <?php 2 namespace cms\action\text; 3 use cms\action\Method; 4 use cms\action\RequestParams; 5 use cms\action\TextAction; 6 use cms\model\Permission; 7 use language\Messages; 8 9 10 class TextValueAction extends TextAction implements Method { 11 12 public function getRequiredPermission() { 13 return Permission::ACL_WRITE; 14 } 15 16 17 public function view() { 18 19 $this->setTemplateVar( 'text', $this->text->loadValue() ); 20 } 21 22 public function post() { 23 24 $this->text->value = $this->request->getText('text'); 25 $this->text->public = $this->request->isTrue('release'); 26 $this->text->saveValue(); 27 28 $this->addNoticeFor($this->text,Messages::VALUE_SAVED); 29 $this->text->setTimestamp(); 30 } 31 }
Downloadmodules/cms/action/text/TextValueAction.class.php
History Wed, 9 Mar 2022 13:28:52 +0100 dankert Refactoring: Checkbox values are always sent to the server. In the actions we must test the value with 'isTrue()' Mon, 6 Dec 2021 01:00:00 +0100 dankert New: Show a version from file history; New: Text history. Wed, 10 Mar 2021 23:51:22 +0100 Jan Dankert Refactoring: Cleaned the Request params. Sat, 6 Mar 2021 03:42:38 +0100 Jan Dankert New: Better permission checks. Fri, 26 Feb 2021 22:47:21 +0100 Jan Dankert Fix: Show value subaction for texts. Fri, 26 Feb 2021 01:06:01 +0100 Jan Dankert Refactoring accessing the request parameter values. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.