function bynder_page_top in Bynder 8
Same name and namespace in other branches
- 8.3 bynder.module \bynder_page_top()
- 8.2 bynder.module \bynder_page_top()
- 4.0.x bynder.module \bynder_page_top()
Implements hook_page_top().
File
- ./
bynder.module, line 134 - Provides bynder integration.
Code
function bynder_page_top(array &$page_top) {
// Hide toolbar on batches that are happening inside Entity browser.
if (!empty($page_top['toolbar']) && ($batch = batch_get()) && !empty($batch['sets'][0]['finished'][0]) && $batch['sets'][0]['finished'][0] == 'Drupal\\bynder\\Plugin\\EntityBrowser\\Widget\\BynderUpload') {
$page_top['toolbar']['#access'] = FALSE;
}
}