[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of eZModuleParamsOperator class 4 // 5 // Created on: <29-juli-2003 18:42:38 admin> 6 // 7 // SOFTWARE NAME: eZ publish 8 // SOFTWARE RELEASE: 3.9.0 9 // BUILD VERSION: 17785 10 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 11 // SOFTWARE LICENSE: GNU General Public License v2.0 12 // NOTICE: > 13 // This program is free software; you can redistribute it and/or 14 // modify it under the terms of version 2.0 of the GNU General 15 // Public License as published by the Free Software Foundation. 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 version 2.0 of the GNU General 23 // Public License along with this program; if not, write to the Free 24 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 25 // MA 02110-1301, USA. 26 // 27 // 28 29 /* 30 If you want to have autoloading of this operator you should create 31 a eztemplateautoload.php file and add the following code to it. 32 The autoload file must be placed somewhere specified in AutoloadPath 33 under the group TemplateSettings in settings/site.ini 34 35 $eZTemplateOperatorArray = array(); 36 $eZTemplateOperatorArray[] = array( 'script' => 'templatemoduleparamsoperator.php', 37 'class' => '$full_class_name', 38 'operator_names' => array( 'module_params' ) ); 39 40 By using module_params you can ... 41 42 Example: 43 \code 44 {module_params|wash} 45 \endcode 46 47 */ 48 49 50 class eZModuleParamsOperator 51 { 52 /*! 53 Constructor, does nothing by default. 54 */ 55 function eZModuleParamsOperator() 56 { 57 } 58 59 /*! 60 \return an array with the template operator name. 61 */ 62 function operatorList() 63 { 64 return array( 'module_params' ); 65 } 66 /*! 67 \return true to tell the template engine that the parameter list exists per operator type, 68 this is needed for operator classes that have multiple operators. 69 */ 70 function namedParameterPerOperator() 71 { 72 return true; 73 } 74 /*! 75 See eZTemplateOperator::namedParameterList 76 */ 77 function namedParameterList() 78 { 79 return array( 'module_params' => array() ); 80 } 81 /*! 82 Executes the PHP function for the operator cleanup and modifies \a $operatorValue. 83 */ 84 function modify( &$tpl, &$operatorName, &$operatorParameters, &$rootNamespace, &$currentNamespace, &$operatorValue, &$namedParameters ) 85 { 86 switch ( $operatorName ) 87 { 88 case 'module_params': 89 { 90 $operatorValue = $GLOBALS['eZRequestedModuleParams']; 91 } break; 92 } 93 } 94 } 95 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |