Zend_Navigation-Containers.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.navigation.containers">
  4. <title>Containers</title>
  5. <para>
  6. Containers have methods for adding, retrieving, deleting and
  7. iterating pages. Containers implement the
  8. <ulink url="http://php.net/spl">SPL</ulink> interfaces
  9. <classname>RecursiveIterator</classname> and
  10. <classname>Countable</classname>, meaning that a container can
  11. be iterated using the SPL
  12. <classname>RecursiveIteratorIterator</classname> class.
  13. </para>
  14. <sect2 id="zend.navigation.containers.creating">
  15. <title>Creating containers</title>
  16. <para>
  17. <classname>Zend_Navigation_Container</classname> is
  18. abstract, and can not be instantiated directly. Use
  19. <classname>Zend_Navigation</classname> if you want to
  20. instantiate a container.
  21. </para>
  22. <para>
  23. <classname>Zend_Navigation</classname> can be constructed
  24. entirely empty, or take an array or a
  25. <classname>Zend_Config</classname> object with pages to put in the
  26. container. Each page in the given array/config will eventually be
  27. passed to the <methodname>addPage()</methodname> method of the container class,
  28. which means that each element in the array/config can be an array or
  29. a config object, or a <classname>Zend_Navigation_Page</classname>
  30. instance.
  31. </para>
  32. <example id="zend.navigation.containers.creating.example.array">
  33. <title>Creating a container using an array</title>
  34. <programlisting language="php"><![CDATA[
  35. /*
  36. * Create a container from an array
  37. *
  38. * Each element in the array will be passed to
  39. * Zend_Navigation_Page::factory() when constructing.
  40. */
  41. $container = new Zend_Navigation(array(
  42. array(
  43. 'label' => 'Page 1',
  44. 'id' => 'home-link'
  45. ),
  46. array(
  47. 'label' => 'Zend',
  48. 'uri' => 'http://www.zend-project.com/',
  49. 'order' => 100
  50. ),
  51. array(
  52. 'label' => 'Page 2',
  53. 'controller' => 'page2',
  54. 'pages' => array(
  55. array(
  56. 'label' => 'Page 2.1',
  57. 'action' => 'page2_1',
  58. 'controller' => 'page2',
  59. 'class' => 'special-one',
  60. 'title' => 'This element has a special class',
  61. 'active' => true
  62. ),
  63. array(
  64. 'label' => 'Page 2.2',
  65. 'action' => 'page2_2',
  66. 'controller' => 'page2',
  67. 'class' => 'special-two',
  68. 'title' => 'This element has a special class too'
  69. )
  70. )
  71. ),
  72. array(
  73. 'label' => 'Page 2 with params',
  74. 'action' => 'index',
  75. 'controller' => 'page2',
  76. // specify a param or two
  77. 'params' => array(
  78. 'format' => 'json',
  79. 'foo' => 'bar'
  80. )
  81. ),
  82. array(
  83. 'label' => 'Page 2 with params and a route',
  84. 'action' => 'index',
  85. 'controller' => 'page2',
  86. // specify a route name and a param for the route
  87. 'route' => 'nav-route-example',
  88. 'params' => array(
  89. 'format' => 'json'
  90. )
  91. ),
  92. array(
  93. 'label' => 'Page 3',
  94. 'action' => 'index',
  95. 'controller' => 'index',
  96. 'module' => 'mymodule',
  97. 'reset_params' => false
  98. ),
  99. array(
  100. 'label' => 'Page 4',
  101. 'uri' => '#',
  102. 'pages' => array(
  103. array(
  104. 'label' => 'Page 4.1',
  105. 'uri' => '/page4',
  106. 'title' => 'Page 4 using uri',
  107. 'pages' => array(
  108. array(
  109. 'label' => 'Page 4.1.1',
  110. 'title' => 'Page 4 using mvc params',
  111. 'action' => 'index',
  112. 'controller' => 'page4',
  113. // let's say this page is active
  114. 'active' => '1'
  115. )
  116. )
  117. )
  118. )
  119. ),
  120. array(
  121. 'label' => 'Page 0?',
  122. 'uri' => '/setting/the/order/option',
  123. // setting order to -1 should make it appear first
  124. 'order' => -1
  125. ),
  126. array(
  127. 'label' => 'Page 5',
  128. 'uri' => '/',
  129. // this page should not be visible
  130. 'visible' => false,
  131. 'pages' => array(
  132. array(
  133. 'label' => 'Page 5.1',
  134. 'uri' => '#',
  135. 'pages' => array(
  136. array(
  137. 'label' => 'Page 5.1.1',
  138. 'uri' => '#',
  139. 'pages' => array(
  140. array(
  141. 'label' => 'Page 5.1.2',
  142. 'uri' => '#',
  143. // let's say this page is active
  144. 'active' => true
  145. )
  146. )
  147. )
  148. )
  149. )
  150. )
  151. ),
  152. array(
  153. 'label' => 'ACL page 1 (guest)',
  154. 'uri' => '#acl-guest',
  155. 'resource' => 'nav-guest',
  156. 'pages' => array(
  157. array(
  158. 'label' => 'ACL page 1.1 (foo)',
  159. 'uri' => '#acl-foo',
  160. 'resource' => 'nav-foo'
  161. ),
  162. array(
  163. 'label' => 'ACL page 1.2 (bar)',
  164. 'uri' => '#acl-bar',
  165. 'resource' => 'nav-bar'
  166. ),
  167. array(
  168. 'label' => 'ACL page 1.3 (baz)',
  169. 'uri' => '#acl-baz',
  170. 'resource' => 'nav-baz'
  171. ),
  172. array(
  173. 'label' => 'ACL page 1.4 (bat)',
  174. 'uri' => '#acl-bat',
  175. 'resource' => 'nav-bat'
  176. )
  177. )
  178. ),
  179. array(
  180. 'label' => 'ACL page 2 (member)',
  181. 'uri' => '#acl-member',
  182. 'resource' => 'nav-member'
  183. ),
  184. array(
  185. 'label' => 'ACL page 3 (admin',
  186. 'uri' => '#acl-admin',
  187. 'resource' => 'nav-admin',
  188. 'pages' => array(
  189. array(
  190. 'label' => 'ACL page 3.1 (nothing)',
  191. 'uri' => '#acl-nada'
  192. )
  193. )
  194. ),
  195. array(
  196. 'label' => 'Zend Framework',
  197. 'route' => 'zf-route'
  198. )
  199. ));
  200. ]]></programlisting>
  201. </example>
  202. <example id="zend.navigation.containers.creating.example.config">
  203. <title>Creating a container using a config object</title>
  204. <programlisting language="php"><![CDATA[
  205. /* CONTENTS OF /path/to/navigation.xml:
  206. <?xml version="1.0" encoding="UTF-8"?>
  207. <config>
  208. <nav>
  209. <zend>
  210. <label>Zend</label>
  211. <uri>http://www.zend-project.com/</uri>
  212. <order>100</order>
  213. </zend>
  214. <page1>
  215. <label>Page 1</label>
  216. <uri>page1</uri>
  217. <pages>
  218. <page1_1>
  219. <label>Page 1.1</label>
  220. <uri>page1/page1_1</uri>
  221. </page1_1>
  222. </pages>
  223. </page1>
  224. <page2>
  225. <label>Page 2</label>
  226. <uri>page2</uri>
  227. <pages>
  228. <page2_1>
  229. <label>Page 2.1</label>
  230. <uri>page2/page2_1</uri>
  231. </page2_1>
  232. <page2_2>
  233. <label>Page 2.2</label>
  234. <uri>page2/page2_2</uri>
  235. <pages>
  236. <page2_2_1>
  237. <label>Page 2.2.1</label>
  238. <uri>page2/page2_2/page2_2_1</uri>
  239. </page2_2_1>
  240. <page2_2_2>
  241. <label>Page 2.2.2</label>
  242. <uri>page2/page2_2/page2_2_2</uri>
  243. <active>1</active>
  244. </page2_2_2>
  245. </pages>
  246. </page2_2>
  247. <page2_3>
  248. <label>Page 2.3</label>
  249. <uri>page2/page2_3</uri>
  250. <pages>
  251. <page2_3_1>
  252. <label>Page 2.3.1</label>
  253. <uri>page2/page2_3/page2_3_1</uri>
  254. </page2_3_1>
  255. <page2_3_2>
  256. <label>Page 2.3.2</label>
  257. <uri>page2/page2_3/page2_3_2</uri>
  258. <visible>0</visible>
  259. <pages>
  260. <page2_3_2_1>
  261. <label>Page 2.3.2.1</label>
  262. <uri>page2/page2_3/page2_3_2/1</uri>
  263. <active>1</active>
  264. </page2_3_2_1>
  265. <page2_3_2_2>
  266. <label>Page 2.3.2.2</label>
  267. <uri>page2/page2_3/page2_3_2/2</uri>
  268. <active>1</active>
  269. <pages>
  270. <page_2_3_2_2_1>
  271. <label>Ignore</label>
  272. <uri>#</uri>
  273. <active>1</active>
  274. </page_2_3_2_2_1>
  275. </pages>
  276. </page2_3_2_2>
  277. </pages>
  278. </page2_3_2>
  279. <page2_3_3>
  280. <label>Page 2.3.3</label>
  281. <uri>page2/page2_3/page2_3_3</uri>
  282. <resource>admin</resource>
  283. <pages>
  284. <page2_3_3_1>
  285. <label>Page 2.3.3.1</label>
  286. <uri>page2/page2_3/page2_3_3/1</uri>
  287. <active>1</active>
  288. </page2_3_3_1>
  289. <page2_3_3_2>
  290. <label>Page 2.3.3.2</label>
  291. <uri>page2/page2_3/page2_3_3/2</uri>
  292. <resource>guest</resource>
  293. <active>1</active>
  294. </page2_3_3_2>
  295. </pages>
  296. </page2_3_3>
  297. </pages>
  298. </page2_3>
  299. </pages>
  300. </page2>
  301. <page3>
  302. <label>Page 3</label>
  303. <uri>page3</uri>
  304. <pages>
  305. <page3_1>
  306. <label>Page 3.1</label>
  307. <uri>page3/page3_1</uri>
  308. <resource>guest</resource>
  309. </page3_1>
  310. <page3_2>
  311. <label>Page 3.2</label>
  312. <uri>page3/page3_2</uri>
  313. <resource>member</resource>
  314. <pages>
  315. <page3_2_1>
  316. <label>Page 3.2.1</label>
  317. <uri>page3/page3_2/page3_2_1</uri>
  318. </page3_2_1>
  319. <page3_2_2>
  320. <label>Page 3.2.2</label>
  321. <uri>page3/page3_2/page3_2_2</uri>
  322. <resource>admin</resource>
  323. </page3_2_2>
  324. </pages>
  325. </page3_2>
  326. <page3_3>
  327. <label>Page 3.3</label>
  328. <uri>page3/page3_3</uri>
  329. <resource>special</resource>
  330. <pages>
  331. <page3_3_1>
  332. <label>Page 3.3.1</label>
  333. <uri>page3/page3_3/page3_3_1</uri>
  334. <visible>0</visible>
  335. </page3_3_1>
  336. <page3_3_2>
  337. <label>Page 3.3.2</label>
  338. <uri>page3/page3_3/page3_3_2</uri>
  339. <resource>admin</resource>
  340. </page3_3_2>
  341. </pages>
  342. </page3_3>
  343. </pages>
  344. </page3>
  345. <home>
  346. <label>Home</label>
  347. <order>-100</order>
  348. <module>default</module>
  349. <controller>index</controller>
  350. <action>index</action>
  351. </home>
  352. </nav>
  353. </config>
  354. */
  355. $config = new Zend_Config_Xml('/path/to/navigation.xml', 'nav');
  356. $container = new Zend_Navigation($config);
  357. ]]></programlisting>
  358. </example>
  359. </sect2>
  360. <sect2 id="zend.navigation.containers.adding">
  361. <title>Adding pages</title>
  362. <para>
  363. Adding pages to a container can be done with the methods
  364. <methodname>addPage()</methodname>, <methodname>addPages()</methodname>, or
  365. <methodname>setPages()</methodname>. See examples below for explanation.
  366. </para>
  367. <example id="zend.navigation.containers.adding.example">
  368. <title>Adding pages to a container</title>
  369. <programlisting language="php"><![CDATA[
  370. // create container
  371. $container = new Zend_Navigation();
  372. // add page by giving a page instance
  373. $container->addPage(Zend_Navigation_Page::factory(array(
  374. 'uri' => 'http://www.example.com/'
  375. )))
  376. // add page by giving an array
  377. $container->addPage(array(
  378. 'uri' => 'http://www.example.com/'
  379. )))
  380. // add page by giving a config object
  381. $container->addPage(new Zend_Config(array(
  382. 'uri' => 'http://www.example.com/'
  383. )))
  384. $pages = array(
  385. array(
  386. 'label' => 'Save'
  387. 'action' => 'save',
  388. ),
  389. array(
  390. 'label' => 'Delete',
  391. 'action' => 'delete'
  392. )
  393. );
  394. // add two pages
  395. $container->addPages($pages);
  396. // remove existing pages and add the given pages
  397. $container->setPages($pages);
  398. ]]></programlisting>
  399. </example>
  400. </sect2>
  401. <sect2 id="zend.navigation.containers.removing">
  402. <title>Removing pages</title>
  403. <para>
  404. Removing pages can be done with <methodname>removePage()</methodname> or
  405. <methodname>removePages()</methodname>. The first method accepts a an instance
  406. of a page, or an integer. The integer corresponds to the
  407. <code>order</code> a page has. The latter method will remove all
  408. pages in the container.
  409. </para>
  410. <example id="zend.navigation.containers.removing.example">
  411. <title>Removing pages from a container</title>
  412. <programlisting language="php"><![CDATA[
  413. $container = new Zend_Navigation(array(
  414. array(
  415. 'label' => 'Page 1',
  416. 'action' => 'page1'
  417. ),
  418. array(
  419. 'label' => 'Page 2',
  420. 'action' => 'page2',
  421. 'order' => 200
  422. ),
  423. array(
  424. 'label' => 'Page 3',
  425. 'action' => 'page3'
  426. )
  427. ));
  428. // remove page by implicit page order
  429. $container->removePage(0); // removes Page 1
  430. // remove page by instance
  431. $page3 = $container->findOneByAction('Page 3');
  432. $container->removePage($page3); // removes Page 3
  433. // remove page by explicit page order
  434. $container->removePage(200); // removes Page 2
  435. // remove all pages
  436. $container->removePages(); // removes all pages
  437. ]]></programlisting>
  438. </example>
  439. </sect2>
  440. <sect2 id="zend.navigation.containers.finding">
  441. <title>Finding pages</title>
  442. <para>
  443. Containers have finder methods for retrieving pages.
  444. They are <methodname>findOneBy($property, $value)</methodname>,
  445. <methodname>findAllBy($property, $value)</methodname>, and
  446. <methodname>findBy($property, $value, $all = false)</methodname>.
  447. Those methods will recursively search the container for
  448. pages matching the given <code>$page->$property == $value</code>.
  449. The first method, <methodname>findOneBy()</methodname>, will return a
  450. single page matching the property with the given value, or
  451. null if it cannot be found. The second method will return
  452. all pages with a property matching the given value. The third
  453. method will call one of the two former methods depending on the
  454. <varname>$all</varname> flag.
  455. </para>
  456. <para>
  457. The finder methods can also be used magically by appending the
  458. property name to <code>findBy</code>, <code>findOneBy</code>, or
  459. <code>findAllBy</code>, e.g. <methodname>findOneByLabel('Home')</methodname> to
  460. return the first matching page with label <code>Home</code>.
  461. Other combinations are <methodname>findByLabel(...)</methodname>,
  462. <methodname>findOnyByTitle(...)</methodname>,
  463. <methodname>findAllByController(...)</methodname>, etc. Finder
  464. methods also work on custom properties, such as
  465. <methodname>findByFoo('bar')</methodname>.
  466. </para>
  467. <example id="zend.navigation.containers.finding.example">
  468. <title>Finding pages in a container</title>
  469. <programlisting language="php"><![CDATA[
  470. $container = new Zend_Navigation(array(
  471. array(
  472. 'label' => 'Page 1',
  473. 'uri' => 'page-1',
  474. 'foo' => 'bar',
  475. 'pages' => array(
  476. array(
  477. 'label' => 'Page 1.1',
  478. 'uri' => 'page-1.1',
  479. 'foo' => 'bar',
  480. ),
  481. array(
  482. 'label' => 'Page 1.2',
  483. 'uri' => 'page-1.2',
  484. 'class' => 'my-class',
  485. ),
  486. array(
  487. 'type' => 'uri',
  488. 'label' => 'Page 1.3',
  489. 'uri' => 'page-1.3',
  490. 'action' => 'about'
  491. )
  492. )
  493. ),
  494. array(
  495. 'label' => 'Page 2',
  496. 'id' => 'page_2_and_3',
  497. 'class' => 'my-class',
  498. 'module' => 'page2',
  499. 'controller' => 'index',
  500. 'action' => 'page1'
  501. ),
  502. array(
  503. 'label' => 'Page 3',
  504. 'id' => 'page_2_and_3',
  505. 'module' => 'page3',
  506. 'controller' => 'index'
  507. )
  508. ));
  509. // The 'id' is not required to be unique, but be aware that
  510. // having two pages with the same id will render the same id attribute
  511. // in menus and breadcrumbs.
  512. $found = $container->findBy('id',
  513. 'page_2_and_3'); // returns Page 2
  514. $found = $container->findOneBy('id',
  515. 'page_2_and_3'); // returns Page 2
  516. $found = $container->findBy('id',
  517. 'page_2_and_3',
  518. true); // returns Page 2 and Page 3
  519. $found = $container->findById('page_2_and_3'); // returns Page 2
  520. $found = $container->findOneById('page_2_and_3'); // returns Page 2
  521. $found = $container->findAllById('page_2_and_3'); // returns Page 2 and Page 3
  522. // Find all matching CSS class my-class
  523. $found = $container->findAllBy('class',
  524. 'my-class'); // returns Page 1.2 and Page 2
  525. $found = $container->findAllByClass('my-class'); // returns Page 1.2 and Page 2
  526. // Find first matching CSS class my-class
  527. $found = $container->findOneByClass('my-class'); // returns Page 1.2
  528. // Find all matching CSS class non-existant
  529. $found = $container->findAllByClass('non-existant'); // returns array()
  530. // Find first matching CSS class non-existant
  531. $found = $container->findOneByClass('non-existant'); // returns null
  532. // Find all pages with custom property 'foo' = 'bar'
  533. $found = $container->findAllBy('foo', 'bar'); // returns Page 1 and Page 1.1
  534. // To achieve the same magically, 'foo' must be in lowercase.
  535. // This is because 'foo' is a custom property, and thus the
  536. // property name is not normalized to 'Foo'
  537. $found = $container->findAllByfoo('bar');
  538. // Find all with controller = 'index'
  539. $found = $container->findAllByController('index'); // returns Page 2 and Page 3
  540. ]]></programlisting>
  541. </example>
  542. </sect2>
  543. <sect2 id="zend.navigation.containers.iterating">
  544. <title>Iterating containers</title>
  545. <para>
  546. <classname>Zend_Navigation_Container</classname> implements
  547. <classname>RecursiveIteratorIterator</classname>, and can be
  548. iterated using any <classname>Iterator</classname> class. To iterate
  549. a container recursively, use the
  550. <classname>RecursiveIteratorIterator</classname> class.
  551. </para>
  552. <example id="zend.navigation.containers.iterating.example">
  553. <title>Iterating a container</title>
  554. <programlisting language="php"><![CDATA[
  555. /*
  556. * Create a container from an array
  557. */
  558. $container = new Zend_Navigation(array(
  559. array(
  560. 'label' => 'Page 1',
  561. 'uri' => '#'
  562. ),
  563. array(
  564. 'label' => 'Page 2',
  565. 'uri' => '#',
  566. 'pages' => array(
  567. array(
  568. 'label' => 'Page 2.1',
  569. 'uri' => '#'
  570. ),
  571. array(
  572. 'label' => 'Page 2.2',
  573. 'uri' => '#'
  574. )
  575. )
  576. )
  577. array(
  578. 'label' => 'Page 3',
  579. 'uri' => '#'
  580. )
  581. ));
  582. // Iterate flat using regular foreach:
  583. // Output: Page 1, Page 2, Page 3
  584. foreach ($container as $page) {
  585. echo $page->label;
  586. }
  587. // Iterate recursively using RecursiveIteratorIterator
  588. $it = new RecursiveIteratorIterator(
  589. $container, RecursiveIteratorIterator::SELF_FIRST);
  590. // Output: Page 1, Page 2, Page 2.1, Page 2.2, Page 3
  591. foreach ($it as $page) {
  592. echo $page->label;
  593. }
  594. ]]></programlisting>
  595. </example>
  596. </sect2>
  597. <sect2 id="zend.navigation.containers.other">
  598. <title>Other operations</title>
  599. <para>
  600. The method <methodname>hasPage(Zend_Navigation_Page $page)</methodname> checks
  601. if the container has the given page. The method <methodname>hasPages()</methodname>
  602. checks if there are any pages in the container, and is equivalent
  603. to <code>count($container) > 1</code>.
  604. </para>
  605. <para>
  606. The <methodname>toArray()</methodname> method converts the container and the
  607. pages in it to an array. This can be useful for serializing and
  608. debugging.
  609. </para>
  610. <example id="zend.navigation.containers.other.example.toarray">
  611. <title>Converting a container to an array</title>
  612. <programlisting language="php"><![CDATA[
  613. $container = new Zend_Navigation(array(
  614. array(
  615. 'label' => 'Page 1',
  616. 'uri' => '#'
  617. ),
  618. array(
  619. 'label' => 'Page 2',
  620. 'uri' => '#',
  621. 'pages' => array(
  622. array(
  623. 'label' => 'Page 2.1',
  624. 'uri' => '#'
  625. ),
  626. array(
  627. 'label' => 'Page 2.2',
  628. 'uri' => '#'
  629. )
  630. )
  631. )
  632. ));
  633. var_dump($container->toArray());
  634. /* Output:
  635. array(2) {
  636. [0]=> array(15) {
  637. ["label"]=> string(6) "Page 1"
  638. ["id"]=> NULL
  639. ["class"]=> NULL
  640. ["title"]=> NULL
  641. ["target"]=> NULL
  642. ["rel"]=> array(0) {
  643. }
  644. ["rev"]=> array(0) {
  645. }
  646. ["order"]=> NULL
  647. ["resource"]=> NULL
  648. ["privilege"]=> NULL
  649. ["active"]=> bool(false)
  650. ["visible"]=> bool(true)
  651. ["type"]=> string(23) "Zend_Navigation_Page_Uri"
  652. ["pages"]=> array(0) {
  653. }
  654. ["uri"]=> string(1) "#"
  655. }
  656. [1]=> array(15) {
  657. ["label"]=> string(6) "Page 2"
  658. ["id"]=> NULL
  659. ["class"]=> NULL
  660. ["title"]=> NULL
  661. ["target"]=> NULL
  662. ["rel"]=> array(0) {
  663. }
  664. ["rev"]=> array(0) {
  665. }
  666. ["order"]=> NULL
  667. ["resource"]=> NULL
  668. ["privilege"]=> NULL
  669. ["active"]=> bool(false)
  670. ["visible"]=> bool(true)
  671. ["type"]=> string(23) "Zend_Navigation_Page_Uri"
  672. ["pages"]=> array(2) {
  673. [0]=> array(15) {
  674. ["label"]=> string(8) "Page 2.1"
  675. ["id"]=> NULL
  676. ["class"]=> NULL
  677. ["title"]=> NULL
  678. ["target"]=> NULL
  679. ["rel"]=> array(0) {
  680. }
  681. ["rev"]=> array(0) {
  682. }
  683. ["order"]=> NULL
  684. ["resource"]=> NULL
  685. ["privilege"]=> NULL
  686. ["active"]=> bool(false)
  687. ["visible"]=> bool(true)
  688. ["type"]=> string(23) "Zend_Navigation_Page_Uri"
  689. ["pages"]=> array(0) {
  690. }
  691. ["uri"]=> string(1) "#"
  692. }
  693. [1]=>
  694. array(15) {
  695. ["label"]=> string(8) "Page 2.2"
  696. ["id"]=> NULL
  697. ["class"]=> NULL
  698. ["title"]=> NULL
  699. ["target"]=> NULL
  700. ["rel"]=> array(0) {
  701. }
  702. ["rev"]=> array(0) {
  703. }
  704. ["order"]=> NULL
  705. ["resource"]=> NULL
  706. ["privilege"]=> NULL
  707. ["active"]=> bool(false)
  708. ["visible"]=> bool(true)
  709. ["type"]=> string(23) "Zend_Navigation_Page_Uri"
  710. ["pages"]=> array(0) {
  711. }
  712. ["uri"]=> string(1) "#"
  713. }
  714. }
  715. ["uri"]=> string(1) "#"
  716. }
  717. }
  718. */
  719. ]]></programlisting>
  720. </example>
  721. </sect2>
  722. </sect1>