LastPage.class.php

gehe zur Dokumentation dieser Datei
00001 <?php
00002 // ---------------------------------------------------------------------------
00003 // $Id$
00004 // ---------------------------------------------------------------------------
00005 // OpenRat Content Management System
00006 // Copyright (C) 2002 Jan Dankert, jandankert@jandankert.de
00007 //
00008 // This program is free software; you can redistribute it and/or
00009 // modify it under the terms of the GNU General Public License
00010 // as published by the Free Software Foundation; either version 2
00011 // of the License, or (at your option) any later version.
00012 //
00013 // This program is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 // GNU General Public License for more details.
00017 //
00018 // You should have received a copy of the GNU General Public License
00019 // along with this program; if not, write to the Free Software
00020 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00021 // ---------------------------------------------------------------------------
00022 // $Log$
00023 // Revision 1.2  2005-01-04 19:59:55  dankert
00024 // Allgemeine Korrekturen, Erben von "Dynamic"-klasse
00025 //
00026 // Revision 1.1  2004/11/10 22:43:35  dankert
00027 // Beispiele fuer dynamische Templateelemente
00028 //
00029 // ---------------------------------------------------------------------------
00030 
00031 
00032 
00037 class LastPage extends Dynamic
00038 {
00043      var $parameters  = Array(
00044           'arrowChar'=>'String between menu entries, default: "&middot;"'
00045           );
00046 
00047 
00048      var $arrowChar = ' &middot; ';
00049 
00054      var $description = 'Creates a main menu.';
00055      var $version     = '$Id$';
00056 
00057 
00058      function execute()
00059      {
00060           $folder = new Folder( $this->page->parentid );
00061 
00062           $lastObject = null;
00063  
00064           // Schleife ueber alle Inhalte des Ordners
00065           foreach( $folder->getObjects() as $o )
00066           {
00067                if ( $o->isPage || $o->isLink )
00068                {
00069                     if   ( is_object($lastObject) && $o->objectid == $this->page->objectid )
00070                     {
00071                          $this->output( '<a href="'.$this->pathToObject($lastObject->objectid).' class="next">'.$lastObject->name.'</a>' );
00072                          break;
00073                     }
00074 
00075                     $lastObject = $o->objectid; 
00076                }
00077           }
00078      }
00079 }

Erzeugt am Thu May 14 00:55:48 2009 für OpenRat von  doxygen 1.5.8