Project

General

Profile

Bug #92508

Updated by David Bruchmann about 4 years ago

Hooking functions created with 
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/tslib/class.tslib_menu.php']['filterMenuPages'][] 
 (defined in TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject) 

 never have access to the capsulated configuration as there isn't any function to expose the values. 
 For a bit more complicated challenges this hook is therefore useless. 

 The ugly but possible alternative is an XCLASS. 

 EDIT: 
 ----- 

 More detailed, using the hook the following interface is mandatory: 
 <pre> 
 /** 
  * interface for classes which hook into AbstractMenuContentObject 
  */ 
 interface AbstractMenuFilterPagesHookInterface 
 { 
     /** 
      * Checks if a page is OK to include in the final menu item array. 
      * 
      * @param array $data Array of menu items 
      * @param array $banUidArray Array of page uids which are to be excluded 
      * @param bool $spacer If set, then the page is a spacer. 
      * @param \TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject $obj The menu object 
      * @return bool Returns TRUE if the page can be safely included. 
      */ 
     public function processFilter(array &$data, array $banUidArray, $spacer, AbstractMenuContentObject $obj); 
 } 
 </pre> 

 All the parameters of processFilter() are filled with values, but most of them can't be accessed because the are protected and never have getter-methods. 

Back