| [ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of eZClassFunctionCollection class 4 // 5 // Created on: <06-Oct-2002 16:19:31 amos> 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 /*! \file ezclassfunctioncollection.php 30 */ 31 32 /*! 33 \class eZClassFunctionCollection ezclassfunctioncollection.php 34 \brief The class eZClassFunctionCollection does 35 36 */ 37 38 include_once ( 'kernel/error/errors.php' ); 39 40 class eZClassFunctionCollection 41 { 42 /*! 43 Constructor 44 */ 45 function eZClassFunctionCollection() 46 { 47 } 48 49 function fetchClassList( $classFilter ) 50 { 51 $contentClassList = array(); 52 if ( is_array( $classFilter ) and count( $classFilter ) == 0) 53 { 54 $classFilter = false; 55 } 56 if ( !is_array( $classFilter ) or 57 count( $classFilter ) > 0 ) 58 { 59 include_once ( 'kernel/classes/ezcontentclass.php' ); 60 $contentClassList = eZContentClass::fetchList( 0, true, false, 61 null, null, 62 $classFilter ); 63 } 64 if ( $contentClassList === null ) 65 return array( 'error' => array( 'error_type' => 'kernel', 66 'error_code' => EZ_ERROR_KERNEL_NOT_FOUND ) ); 67 return array( 'result' => $contentClassList ); 68 } 69 70 function fetchLatestClassList( $offset, $limit ) 71 { 72 $contentClassList = array(); 73 include_once ( 'kernel/classes/ezcontentclass.php' ); 74 $limitData = null; 75 if ( $limit ) 76 $limitData = array( 'offset' => $offset, 77 'length' => $limit ); 78 $contentClassList = eZContentClass::fetchList( 0, true, false, 79 array( 'modified' => 'desc' ), null, 80 false, $limitData ); 81 return array( 'result' => $contentClassList ); 82 } 83 84 function fetchClassAttributeList( $classID ) 85 { 86 include_once ( 'kernel/classes/ezcontentclass.php' ); 87 $contentClassAttributeList =& eZContentClass::fetchAttributes( $classID ); 88 if ( $contentClassAttributeList === null ) 89 return array( 'error' => array( 'error_type' => 'kernel', 90 'error_code' => EZ_ERROR_KERNEL_NOT_FOUND ) ); 91 return array( 'result' => $contentClassAttributeList ); 92 } 93 94 function fetchOverrideTemplateList( $classID ) 95 { 96 $class = eZContentClass::fetch( $classID ); 97 $classIdentifier = $class->attribute( 'identifier' ); 98 99 $result = array (); 100 101 $ini =& eZINI::instance(); 102 103 $siteAccessArray = $ini->variable('SiteAccessSettings', 'AvailableSiteAccessList' ); 104 105 foreach ( $siteAccessArray as $siteAccess ) 106 { 107 $overrides = eZTemplateDesignResource::overrideArray( $siteAccess ); 108 109 foreach( $overrides as $override ) 110 { 111 if ( isset( $override['custom_match'] ) ) 112 { 113 foreach( $override['custom_match'] as $customMatch ) 114 { 115 if( isset( $customMatch['conditions']['class_identifier'] ) && 116 $customMatch['conditions']['class_identifier'] == $classIdentifier ) 117 { 118 $result[] = array( 'siteaccess' => $siteAccess, 119 'block' => $customMatch['override_name'], 120 'source' => $override['template'], 121 'target' => $customMatch['match_file'] ); 122 } 123 124 if( isset( $customMatch['conditions']['class'] ) && 125 $customMatch['conditions']['class'] == $classID ) 126 { 127 128 $result[] = array( 'siteaccess' => $siteAccess, 129 'block' => $customMatch['override_name'], 130 'source' => $override['template'], 131 'target' => $customMatch['match_file'] ); 132 } 133 } 134 } 135 } 136 137 } 138 139 return array( 'result' => $result ); 140 } 141 142 } 143 144 ?>
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 |