Zend_Navigation-Containers.xml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  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 <code>addPage()</code> 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. </home>
  349. </nav>
  350. </config>
  351. */
  352. $config = new Zend_Config_Xml('/path/to/navigation.xml', 'nav');
  353. $container = new Zend_Navigation($config);
  354. ]]></programlisting>
  355. </example>
  356. </sect2>
  357. <sect2 id="zend.navigation.containers.adding">
  358. <title>Adding pages</title>
  359. <para>
  360. Adding pages to a container can be done with the methods
  361. <code>addPage()</code>, <code>addPages()</code>, or
  362. <code>setPages()</code>. See examples below for explanation.
  363. </para>
  364. <example id="zend.navigation.containers.adding.example">
  365. <title>Adding pages to a container</title>
  366. <programlisting language="php"><![CDATA[
  367. // create container
  368. $container = new Zend_Navigation();
  369. // add page by giving a page instance
  370. $container->addPage(Zend_Navigation_Page::factory(array(
  371. 'uri' => 'http://www.example.com/'
  372. )))
  373. // add page by giving an array
  374. $container->addPage(array(
  375. 'uri' => 'http://www.example.com/'
  376. )))
  377. // add page by giving a config object
  378. $container->addPage(new Zend_Config(array(
  379. 'uri' => 'http://www.example.com/'
  380. )))
  381. $pages = array(
  382. array(
  383. 'label' => 'Save'
  384. 'action' => 'save',
  385. ),
  386. array(
  387. 'label' => 'Delete',
  388. 'action' => 'delete'
  389. )
  390. );
  391. // add two pages
  392. $container->addPages($pages);
  393. // remove existing pages and add the given pages
  394. $container->setPages($pages);
  395. ]]></programlisting>
  396. </example>
  397. </sect2>
  398. <sect2 id="zend.navigation.containers.removing">
  399. <title>Removing pages</title>
  400. <para>
  401. Removing pages can be done with <code>removePage()</code> or
  402. <code>removePages()</code>. The first method accepts a an instance
  403. of a page, or an integer. The integer corresponds to the
  404. <code>order</code> a page has. The latter method will remove all
  405. pages in the container.
  406. </para>
  407. <example id="zend.navigation.containers.removing.example">
  408. <title>Removing pages from a container</title>
  409. <programlisting language="php"><![CDATA[
  410. $container = new Zend_Navigation(array(
  411. array(
  412. 'label' => 'Page 1',
  413. 'action' => 'page1'
  414. ),
  415. array(
  416. 'label' => 'Page 2',
  417. 'action' => 'page2',
  418. 'order' => 200
  419. ),
  420. array(
  421. 'label' => 'Page 3',
  422. 'action' => 'page3'
  423. )
  424. ));
  425. // remove page by implicit page order
  426. $container->removePage(0); // removes Page 1
  427. // remove page by instance
  428. $page3 = $container->findOneByAction('Page 3');
  429. $container->removePage($page3); // removes Page 3
  430. // remove page by explicit page order
  431. $container->removePage(200); // removes Page 2
  432. // remove all pages
  433. $container->removePages(); // removes all pages
  434. ]]></programlisting>
  435. </example>
  436. </sect2>
  437. <sect2 id="zend.navigation.containers.finding">
  438. <title>Finding pages</title>
  439. <para>
  440. Containers have finder methods for retrieving pages.
  441. They are <code>findOneBy($property, $value)</code>,
  442. <code>findAllBy($property, $value)</code>, and
  443. <code>findBy($property, $value, $all = false)</code>.
  444. Those methods will recursively search the container for
  445. pages matching the given <code>$page->$property == $value</code>.
  446. The first method, <code>findOneBy()</code>, will return a
  447. single page matching the property with the given value, or
  448. null if it cannot be found. The second method will return
  449. all pages with a property matching the given value. The third
  450. method will call one of the two former methods depending on the
  451. <code>$all</code> flag.
  452. </para>
  453. <para>
  454. The finder methods can also be used magically by appending the
  455. property name to <code>findBy</code>, <code>findOneBy</code>, or
  456. <code>findAllBy</code>, e.g. <code>findOneByLabel('Home')</code> to
  457. return the first matching page with label <code>Home</code>.
  458. Other combinations are <code>findByLabel(...)</code>,
  459. <code>findOnyByTitle(...)</code>,
  460. <code>findAllByController(...)</code>, etc. Finder
  461. methods also work on custom properties, such as
  462. <code>findByFoo('bar')</code>.
  463. </para>
  464. <example id="zend.navigation.containers.finding.example">
  465. <title>Finding pages in a container</title>
  466. <programlisting language="php"><![CDATA[
  467. $container = new Zend_Navigation(array(
  468. array(
  469. 'label' => 'Page 1',
  470. 'uri' => 'page-1',
  471. 'foo' => 'bar',
  472. 'pages' => array(
  473. array(
  474. 'label' => 'Page 1.1',
  475. 'uri' => 'page-1.1',
  476. 'foo' => 'bar',
  477. ),
  478. array(
  479. 'label' => 'Page 1.2',
  480. 'uri' => 'page-1.2',
  481. 'class' => 'my-class',
  482. ),
  483. array(
  484. 'type' => 'uri',
  485. 'label' => 'Page 1.3',
  486. 'uri' => 'page-1.3',
  487. 'action' => 'about'
  488. )
  489. )
  490. ),
  491. array(
  492. 'label' => 'Page 2',
  493. 'id' => 'page_2_and_3',
  494. 'class' => 'my-class',
  495. 'module' => 'page2',
  496. 'controller' => 'index',
  497. 'action' => 'page1'
  498. ),
  499. array(
  500. 'label' => 'Page 3',
  501. 'id' => 'page_2_and_3',
  502. 'module' => 'page3',
  503. 'controller' => 'index'
  504. )
  505. ));
  506. // The 'id' is not required to be unique, but be aware that
  507. // having two pages with the same id will render the same id attribute
  508. // in menus and breadcrumbs.
  509. $found = $container->findBy('id',
  510. 'page_2_and_3'); // returns Page 2
  511. $found = $container->findOneBy('id',
  512. 'page_2_and_3'); // returns Page 2
  513. $found = $container->findBy('id',
  514. 'page_2_and_3',
  515. true); // returns Page 2 and Page 3
  516. $found = $container->findById('page_2_and_3'); // returns Page 2
  517. $found = $container->findOneById('page_2_and_3'); // returns Page 2
  518. $found = $container->findAllById('page_2_and_3'); // returns Page 2 and Page 3
  519. // Find all matching CSS class my-class
  520. $found = $container->findAllBy('class',
  521. 'my-class'); // returns Page 1.2 and Page 2
  522. $found = $container->findAllByClass('my-class'); // returns Page 1.2 and Page 2
  523. // Find first matching CSS class my-class
  524. $found = $container->findOneByClass('my-class'); // returns Page 1.2
  525. // Find all matching CSS class non-existant
  526. $found = $container->findAllByClass('non-existant'); // returns array()
  527. // Find first matching CSS class non-existant
  528. $found = $container->findOneByClass('non-existant'); // returns null
  529. // Find all pages with custom property 'foo' = 'bar'
  530. $found = $container->findAllBy('foo', 'bar'); // returns Page 1 and Page 1.1
  531. // To achieve the same magically, 'foo' must be in lowercase.
  532. // This is because 'foo' is a custom property, and thus the
  533. // property name is not normalized to 'Foo'
  534. $found = $container->findAllByfoo('bar');
  535. // Find all with controller = 'index'
  536. $found = $container->findAllByController('index'); // returns Page 2 and Page 3
  537. ]]></programlisting>
  538. </example>
  539. </sect2>
  540. <sect2 id="zend.navigation.containers.iterating">
  541. <title>Iterating containers</title>
  542. <para>
  543. <classname>Zend_Navigation_Container</classname> implements
  544. <classname>RecursiveIteratorIterator</classname>, and can be
  545. iterated using any <classname>Iterator</classname> class. To iterate
  546. a container recursively, use the
  547. <classname>RecursiveIteratorIterator</classname> class.
  548. </para>
  549. <example id="zend.navigation.containers.iterating.example">
  550. <title>Iterating a container</title>
  551. <programlisting language="php"><![CDATA[
  552. /*
  553. * Create a container from an array
  554. */
  555. $container = new Zend_Navigation(array(
  556. array(
  557. 'label' => 'Page 1',
  558. 'uri' => '#'
  559. ),
  560. array(
  561. 'label' => 'Page 2',
  562. 'uri' => '#',
  563. 'pages' => array(
  564. array(
  565. 'label' => 'Page 2.1',
  566. 'uri' => '#'
  567. ),
  568. array(
  569. 'label' => 'Page 2.2',
  570. 'uri' => '#'
  571. )
  572. )
  573. )
  574. array(
  575. 'label' => 'Page 3',
  576. 'uri' => '#'
  577. )
  578. ));
  579. // Iterate flat using regular foreach:
  580. // Output: Page 1, Page 2, Page 3
  581. foreach ($container as $page) {
  582. echo $page->label;
  583. }
  584. // Iterate recursively using RecursiveIteratorIterator
  585. $it = new RecursiveIteratorIterator(
  586. $container, RecursiveIteratorIterator::SELF_FIRST);
  587. // Output: Page 1, Page 2, Page 2.1, Page 2.2, Page 3
  588. foreach ($it as $page) {
  589. echo $page->label;
  590. }
  591. ]]></programlisting>
  592. </example>
  593. </sect2>
  594. <sect2 id="zend.navigation.containers.other">
  595. <title>Other operations</title>
  596. <para>
  597. The method <code>hasPage(Zend_Navigation_Page $page)</code> checks
  598. if the container has the given page. The method <code>hasPages()</code>
  599. checks if there are any pages in the container, and is equivalent
  600. to <code>count($container) > 1</code>.
  601. </para>
  602. <para>
  603. The <code>toArray()</code> method converts the container and the
  604. pages in it to an array. This can be useful for serializing and
  605. debugging.
  606. </para>
  607. <example id="zend.navigation.containers.other.example.toarray">
  608. <title>Converting a container to an array</title>
  609. <programlisting language="php"><![CDATA[
  610. $container = new Zend_Navigation(array(
  611. array(
  612. 'label' => 'Page 1',
  613. 'uri' => '#'
  614. ),
  615. array(
  616. 'label' => 'Page 2',
  617. 'uri' => '#',
  618. 'pages' => array(
  619. array(
  620. 'label' => 'Page 2.1',
  621. 'uri' => '#'
  622. ),
  623. array(
  624. 'label' => 'Page 2.2',
  625. 'uri' => '#'
  626. )
  627. )
  628. )
  629. ));
  630. var_dump($container->toArray());
  631. /* Output:
  632. array(2) {
  633. [0]=> array(15) {
  634. ["label"]=> string(6) "Page 1"
  635. ["id"]=> NULL
  636. ["class"]=> NULL
  637. ["title"]=> NULL
  638. ["target"]=> NULL
  639. ["rel"]=> array(0) {
  640. }
  641. ["rev"]=> array(0) {
  642. }
  643. ["order"]=> NULL
  644. ["resource"]=> NULL
  645. ["privilege"]=> NULL
  646. ["active"]=> bool(false)
  647. ["visible"]=> bool(true)
  648. ["type"]=> string(23) "Zend_Navigation_Page_Uri"
  649. ["pages"]=> array(0) {
  650. }
  651. ["uri"]=> string(1) "#"
  652. }
  653. [1]=> array(15) {
  654. ["label"]=> string(6) "Page 2"
  655. ["id"]=> NULL
  656. ["class"]=> NULL
  657. ["title"]=> NULL
  658. ["target"]=> NULL
  659. ["rel"]=> array(0) {
  660. }
  661. ["rev"]=> array(0) {
  662. }
  663. ["order"]=> NULL
  664. ["resource"]=> NULL
  665. ["privilege"]=> NULL
  666. ["active"]=> bool(false)
  667. ["visible"]=> bool(true)
  668. ["type"]=> string(23) "Zend_Navigation_Page_Uri"
  669. ["pages"]=> array(2) {
  670. [0]=> array(15) {
  671. ["label"]=> string(8) "Page 2.1"
  672. ["id"]=> NULL
  673. ["class"]=> NULL
  674. ["title"]=> NULL
  675. ["target"]=> NULL
  676. ["rel"]=> array(0) {
  677. }
  678. ["rev"]=> array(0) {
  679. }
  680. ["order"]=> NULL
  681. ["resource"]=> NULL
  682. ["privilege"]=> NULL
  683. ["active"]=> bool(false)
  684. ["visible"]=> bool(true)
  685. ["type"]=> string(23) "Zend_Navigation_Page_Uri"
  686. ["pages"]=> array(0) {
  687. }
  688. ["uri"]=> string(1) "#"
  689. }
  690. [1]=>
  691. array(15) {
  692. ["label"]=> string(8) "Page 2.2"
  693. ["id"]=> NULL
  694. ["class"]=> NULL
  695. ["title"]=> NULL
  696. ["target"]=> NULL
  697. ["rel"]=> array(0) {
  698. }
  699. ["rev"]=> array(0) {
  700. }
  701. ["order"]=> NULL
  702. ["resource"]=> NULL
  703. ["privilege"]=> NULL
  704. ["active"]=> bool(false)
  705. ["visible"]=> bool(true)
  706. ["type"]=> string(23) "Zend_Navigation_Page_Uri"
  707. ["pages"]=> array(0) {
  708. }
  709. ["uri"]=> string(1) "#"
  710. }
  711. }
  712. ["uri"]=> string(1) "#"
  713. }
  714. }
  715. */
  716. ]]></programlisting>
  717. </example>
  718. </sect2>
  719. </sect1>