TextAction.class.php (1368B)
1 <?php 2 3 4 namespace cms\action; 5 6 use cms\model\Text; 7 use language\Messages; 8 9 // OpenRat Content Management System 10 // Copyright (C) 2002-2012 Jan Dankert, cms@jandankert.de 11 // 12 // This program is free software; you can redistribute it and/or 13 // modify it under the terms of the GNU General Public License 14 // as published by the Free Software Foundation; either version 2 15 // of the License, or (at your option) any later version. 16 // 17 // This program is distributed in the hope that it will be useful, 18 // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 // GNU General Public License for more details. 21 // 22 // You should have received a copy of the GNU General Public License 23 // along with this program; if not, write to the Free Software 24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 25 26 27 /** 28 * Action-Klasse zum Bearbeiten einer Datei 29 * @author Jan Dankert 30 */ 31 class TextAction extends FileAction 32 { 33 /** 34 * @var Text 35 */ 36 protected $text; 37 38 /** 39 * Konstruktor 40 */ 41 function __construct() 42 { 43 parent::__construct(); 44 } 45 46 47 public function init() 48 { 49 50 $text = new Text($this->request->getId()); 51 $text->load(); 52 53 $this->setBaseObject( $text ); 54 } 55 56 57 58 protected function setBaseObject( $text ) { 59 60 $this->text = $text; 61 62 parent::setBaseObject( $text ); 63 } 64 }