Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

eznavigationpart.php
Go to the documentation of this file.
1 <?php
31 class eZNavigationPart
32 {
41 static function fetchPartByIdentifier( $identifier )
42 {
43 $parts = eZNavigationPart::fetchList();
44
45 if ( isset( $parts[$identifier] ) )
46 return $parts[$identifier];
47
48 // Return the first part which is the default
49 $firstPart = reset( $parts );
50 return $firstPart !== false ? $firstPart : false;
51 }
52
59 static function fetchList()
60 {
61 $list =& $GLOBALS['eZNavigationPartList'];
62 if ( isset( $list ) )
63 return $list;
64
65 $ini = eZINI::instance( 'menu.ini' );
66 $parts = $ini->variable( 'NavigationPart', 'Part' );
67 $list = array();
68 foreach ( $parts as $identifier => $name )
69 {
70 $list[$identifier] = array( 'name' => ezpI18n::tr( 'kernel/navigationpart', $name, 'Navigation part' ),
71 'identifier' => $identifier );
72 }
73 return $list;
74 }
75
80 private static function i18nDummy()
81 {
82 ezpI18n::tr( 'kernel/navigationpart', 'Content structure', 'Navigation part' );
83 ezpI18n::tr( 'kernel/navigationpart', 'Media library', 'Navigation part' );
84 ezpI18n::tr( 'kernel/navigationpart', 'User accounts', 'Navigation part' );
85 ezpI18n::tr( 'kernel/navigationpart', 'Webshop', 'Navigation part' );
86 ezpI18n::tr( 'kernel/navigationpart', 'Design', 'Navigation part' );
87 ezpI18n::tr( 'kernel/navigationpart', 'Setup', 'Navigation part' );
88 ezpI18n::tr( 'kernel/navigationpart', 'My account', 'Navigation part' );
89 }
90
91 }
92
93 ?>
eZNavigationPart
eZNavigationPart handles grouping of functions across modules
Definition: eznavigationpart.php:32
eZNavigationPart\fetchList
static fetchList()
Definition: eznavigationpart.php:59
eZNavigationPart\fetchPartByIdentifier
static fetchPartByIdentifier( $identifier)
Definition: eznavigationpart.php:41
eZNavigationPart\i18nDummy
static i18nDummy()
Definition: eznavigationpart.php:80
ezpI18n\tr
static tr( $context, $source, $comment=null, $arguments=null)
Definition: ezpi18n.php:86
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.