Pageelement.class.php (1416B)
1 <?php 2 namespace cms\model; 3 // OpenRat Content Management System 4 // Copyright (C) 2002-2012 Jan Dankert, cms@jandankert.de 5 // 6 // This program is free software; you can redistribute it and/or 7 // modify it under the terms of the GNU General Public License 8 // as published by the Free Software Foundation; either version 2 9 // of the License, or (at your option) any later version. 10 // 11 // This program is distributed in the hope that it will be useful, 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 // GNU General Public License for more details. 15 // 16 // You should have received a copy of the GNU General Public License 17 // along with this program; if not, write to the Free Software 18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 use cms\mustache\Mustache; 20 use cms\publish\PublishPreview;use cms\publish\PublishPublic; 21 use Logger; 22 use util\FileCache; 23 24 25 /** 26 * Pageelement. 27 * 28 * @author Jan Dankert 29 */ 30 31 class Pageelement extends ModelBase 32 { 33 private $pageid; 34 private $elementid; 35 36 function __construct($objectid='' ) 37 { 38 parent::__construct(); 39 40 $ids = explode('_',$objectid); 41 if ( count($ids) > 1 ) 42 list( $this->pageid, $this->elementid ) = $ids; 43 } 44 45 46 function load() { 47 48 } 49 50 51 public function getName() 52 { 53 $e = new Element( $this->elementid ); 54 $e->load(); 55 return $e->getName(); 56 } 57 } 58