original_string: protected function _addNotificationMenu()
      {
          $this->Menu->area('headerLeft');
  
          $this->Menu->add('notifier.notifications', [
              'title' => __d('CakeAdmin', 'Notifications ({0})', $this->Notifier->countNotifications(null, true)),
              'url' => '#',
              'weight' => 5
          ]);
  
          $notifications = $this->Notifier->getNotifications(null, true);
  
          foreach ($notifications as $not) {
              $this->Menu->add('notifier.notifications.' . $not->id, [
                  'parent' => 'notifier.notifications',
                  'title' => $not->title,
                  'url' => [
                      'prefix' => 'admin',
                      'plugin' => 'CakeAdmin',
                      'controller' => 'Notifications',
                      'action' => 'index'
                  ]
              ]);
          }
  
          $this->Menu->add('notifier.notifications.url', [
              'parent' => 'notifier.notifications',
              'title' => '> ' . __d('CakeAdmin', 'All Notifications'),
              'url' => [
                  'prefix' => 'admin',
                  'plugin' => 'CakeAdmin',
                  'controller' => 'Notifications',
                  'action' => 'index'
              ]
          ]);
      }
code: protected function _addNotificationMenu()
      {
          $this->Menu->area('headerLeft');
  
          $this->Menu->add('notifier.notifications', [
              'title' => __d('CakeAdmin', 'Notifications ({0})', $this->Notifier->countNotifications(null, true)),
              'url' => '#',
              'weight' => 5
          ]);
  
          $notifications = $this->Notifier->getNotifications(null, true);
  
          foreach ($notifications as $not) {
              $this->Menu->add('notifier.notifications.' . $not->id, [
                  'parent' => 'notifier.notifications',
                  'title' => $not->title,
                  'url' => [
                      'prefix' => 'admin',
                      'plugin' => 'CakeAdmin',
                      'controller' => 'Notifications',
                      'action' => 'index'
                  ]
              ]);
          }
  
          $this->Menu->add('notifier.notifications.url', [
              'parent' => 'notifier.notifications',
              'title' => '> ' . __d('CakeAdmin', 'All Notifications'),
              'url' => [
                  'prefix' => 'admin',
                  'plugin' => 'CakeAdmin',
                  'controller' => 'Notifications',
                  'action' => 'index'
              ]
          ]);
      }
code_tokens: protected function _addNotificationMenu ( ) { $ this -> Menu -> area ( 'headerLeft' ) ; $ this -> Menu -> add ( 'notifier.notifications' , [ 'title' => __d ( 'CakeAdmin' , 'Notifications ({0})' , $ this -> Notifier -> countNotifications ( null , true ) ) , 'url' => '#' , 'weight' => 5 ] ) ; $ notifications = $ this -> Notifier -> getNotifications ( null , true ) ; foreach ( $ notifications as $ not ) { $ this -> Menu -> add ( 'notifier.notifications.' . $ not -> id , [ 'parent' => 'notifier.notifications' , 'title' => $ not -> title , 'url' => [ 'prefix' => 'admin' , 'plugin' => 'CakeAdmin' , 'controller' => 'Notifications' , 'action' => 'index' ] ] ) ; } $ this -> Menu -> add ( 'notifier.notifications.url' , [ 'parent' => 'notifier.notifications' , 'title' => '> ' . __d ( 'CakeAdmin' , 'All Notifications' ) , 'url' => [ 'prefix' => 'admin' , 'plugin' => 'CakeAdmin' , 'controller' => 'Notifications' , 'action' => 'index' ] ] ) ; }
docstring: Adds the notification-menu-item to the header menu.
  
  @return void
docstring_tokens: Adds the notification - menu - item to the header menu .