UrlAction.class.php (1417B)
1 <?php 2 3 namespace cms\action; 4 5 use cms\model\Url; 6 use language\Messages; 7 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 f?r Verkn?pfungen 29 * @version $Id$ 30 * @author $Author$ 31 * @package openrat.actions 32 */ 33 class UrlAction extends ObjectAction 34 { 35 /** 36 * @var Url 37 */ 38 protected $url; 39 40 /** 41 * Konstruktor 42 */ 43 function __construct() 44 { 45 parent::__construct(); 46 47 } 48 49 50 public function init() 51 { 52 $url = new Url( $this->request->getId() ); 53 $url->load(); 54 55 $this->setBaseObject( $url ); 56 } 57 58 protected function setBaseObject( $url ) { 59 60 $this->url = $url; 61 62 parent::setBaseObject( $url ); 63 } 64 }