openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

Pageelement.class.php (1574B)


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