|
eZ Publish
[4.0]
|
00001 <?php 00002 // 00003 // Definition of eZPDFXMLOutput class 00004 // 00005 // Created on: <25-Sep-2006 15:05:00 ks> 00006 // 00007 // ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## 00008 // SOFTWARE NAME: eZ Publish 00009 // SOFTWARE RELEASE: 4.0.x 00010 // COPYRIGHT NOTICE: Copyright (C) 1999-2008 eZ Systems AS 00011 // SOFTWARE LICENSE: GNU General Public License v2.0 00012 // NOTICE: > 00013 // This program is free software; you can redistribute it and/or 00014 // modify it under the terms of version 2.0 of the GNU General 00015 // Public License as published by the Free Software Foundation. 00016 // 00017 // This program is distributed in the hope that it will be useful, 00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 // GNU General Public License for more details. 00021 // 00022 // You should have received a copy of version 2.0 of the GNU General 00023 // Public License along with this program; if not, write to the Free 00024 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00025 // MA 02110-1301, USA. 00026 // 00027 // 00028 // ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## 00029 // 00030 00031 /*! 00032 */ 00033 00034 //include_once( 'kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php' ); 00035 00036 class eZPDFXMLOutput extends eZXHTMLXMLOutput 00037 { 00038 00039 function eZPDFXMLOutput( &$xmlData, $aliasedType, $contentObjectAttribute = null ) 00040 { 00041 $this->eZXHTMLXMLOutput( $xmlData, $aliasedType, $contentObjectAttribute ); 00042 00043 $this->OutputTags['table']['initHandler'] = 'initHandlerTable'; 00044 $this->OutputTags['li']['initHandler'] = 'initHandlerLi'; 00045 } 00046 00047 function initHandlerTable( $element, &$attributes, &$sibilingParams, &$parentParams ) 00048 { 00049 $ret = array(); 00050 00051 if( !isset( $attributes['width'] ) ) 00052 $attributes['width'] = '100%'; 00053 00054 if( !isset( $attributes['border'] ) ) 00055 $attributes['border'] = 1; 00056 00057 return $ret; 00058 } 00059 00060 function initHandlerLi( $element, &$attributes, &$sibilingParams, &$parentParams ) 00061 { 00062 if( !isset( $sibilingParams['list_count'] ) ) 00063 $sibilingParams['list_count'] = 1; 00064 else 00065 $sibilingParams['list_count']++; 00066 00067 $ret = array( 'tpl_vars' => array( 'list_count' => $sibilingParams['list_count'], 00068 'tag_name' => $element->parentNode->nodeName ) ); 00069 return $ret; 00070 } 00071 00072 public $TemplatesPath = 'design:content/datatype/pdf/ezxmltags/'; 00073 } 00074 00075 ?>