title: Extending HMENU with extensions records
body: <p>In my extension there are categories and products. I want the categories to be shown as submenu.</p>
  
  <p>My page tree looks like this:</p>
  
  <ul>
  <li>Home </li>
  <li>Clothes (uid: 2)</li>
  <li>Special Offers (uid: 3) 
  
  <ul>
  <li>Workwear (uid: 4)</li>
  </ul></li>
  </ul>
  
  <p>On pages "Clothes" (uid: 2) and "Workwear" (uid: 4) I have a plugin that will show the categories and products.</p>
  
  <p>The categories to be shown are defined in TS setup (with an ext+ template on each pages) like this:</p>
  
  <pre><code>plugin.tx_productsdb.settings.categories = 1,2,3,4
  </code></pre>
  
  <p>the typoscript for my subnavigation looks like this:</p>
  
  <pre><code>nav.subnavigation = COA
  nav.subnavigation {
  
    10 = HMENU
    10 {
      entryLevel = 0
  
      1 = TMENU
      1 {
        wrap = &lt;ul&gt;|&lt;/ul&gt;
        NO = 0
        NO.wrapItemAndSub = &lt;li class="first"&gt;|&lt;/li&gt; |*| &lt;li&gt;|&lt;/li&gt; |*| &lt;li class="last"&gt;|&lt;/li&gt;
  
        ACT = 1
        ACT.wrapItemAndSub = &lt;li class="active first"&gt;|&lt;/li&gt; |*| &lt;li class="active"&gt;|&lt;/li&gt; |*| &lt;li class="active last"&gt;|&lt;/li&gt;
        ACT.ATagParams = class="active"
  
        CUR &lt; .ACT
      }
      2 &lt; .1
      2.wrap = &lt;ul class="level2"&gt;|&lt;/ul&gt;
      3 &lt; .1
      3.wrap = &lt;ul class="level3"&gt;|&lt;/ul&gt;
    }
  }
  </code></pre>
  
  <p>I already tried to use the <strong>itemArrayProcFunc</strong> property of HMENU, but I couldn't find an example on how to use it with my namespaced extension.</p>
  
  <p>i tried this:</p>
  
  <pre><code>  10 = HMENU
    10 {
      entryLevel = 0
      itemArrayProcFunc = Vendor\Extension\Hooks\Subnavigation-&gt;process
  </code></pre>
  
  <p>And here's the function:</p>
  
  <pre><code>class Subnavigation
  {
      /**
       * @param $menuArr
       * @param $conf
       */
      public function process(&amp;$menuArr, &amp;$conf)
      {
          // show me, that something is happening here ... pretty please!
          \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($menuArr);
          exit;
      }
  }
  </code></pre>
  
  <p>If you've got any example on how to do it, please let me know. 
  Thanks in advance.</p>