Project

General

Profile

Bug #80495

Updated by Thomas Hohn about 7 years ago

In TYPO3 7.6 it was possible to add menu items to the the top of the click menu 
 for instance in menu. In the List-Module. 

 We have a use-case with at custom table - where it's possible to show a preview 
 of the Item as well as normal Record operations like edit etc. In current version of TYPO3 8 this is not possible.  
 The location of menu items is handled via the method getPriority method in 
 the @ProviderInterface@.  

 Unfortunately the current implementation of the method addItems in RecordProvider class 
 prohibits entries above the priority in RecordProvider (60) which is what we want - due to the following code: 
 <pre> 
 public function addItems(array $items): array 
     { 
         if (!empty($items)) { 
             return $items; 
         } 
         $this->initialize(); 
         return $this->prepareItems($this->itemsConfiguration); 
     } 
 </pre> 
 Which means defining items with at priority above 60 will result in only these the items beeing displayed  
 and additionally items with a priority below 60. 
 not the RecordProvider's due to the early return condition. 
 <pre> 
 public function addItems(array $items): array 
     { 
         $this->initialize(); 
         $items += $this->prepareItems($this->itemsConfiguration); 
         return $items; 
     } 

 </pre>

Back