original_string: private function get_notifications($user) : array {
          $notifications = $this->notifications;
          $discussion = $this->discussion;
          $forum = $this->forum;
          $renderer = $this->renderer;
  
          if ($forum->is_cutoff_date_reached()) {
              $notifications[] = (new notification(
                      get_string('cutoffdatereached', 'forum'),
                      notification::NOTIFY_INFO
              ))->set_show_closebutton();
          } else if ($forum->is_due_date_reached()) {
              $notifications[] = (new notification(
                      get_string('thisforumisdue', 'forum', userdate($forum->get_due_date())),
                      notification::NOTIFY_INFO
              ))->set_show_closebutton();
          } else if ($forum->has_due_date()) {
              $notifications[] = (new notification(
                      get_string('thisforumhasduedate', 'forum', userdate($forum->get_due_date())),
                      notification::NOTIFY_INFO
              ))->set_show_closebutton();
          }
  
          if ($forum->is_discussion_locked($discussion)) {
              $notifications[] = (new notification(
                  get_string('discussionlocked', 'forum'),
                  notification::NOTIFY_INFO
              ))
              ->set_extra_classes(['discussionlocked'])
              ->set_show_closebutton();
          }
  
          if ($forum->get_type() == 'qanda') {
              if ($this->capabilitymanager->must_post_before_viewing_discussion($user, $discussion)) {
                  $notifications[] = (new notification(
                      get_string('qandanotify', 'forum')
                  ))->set_show_closebutton(true);
              }
          }
  
          if ($forum->has_blocking_enabled()) {
              $notifications[] = (new notification(
                  get_string('thisforumisthrottled', 'forum', [
                      'blockafter' => $forum->get_block_after(),
                      'blockperiod' => get_string('secondstotime' . $forum->get_block_period())
                  ])
              ))->set_show_closebutton();
          }
  
          return array_map(function($notification) {
              return $notification->export_for_template($this->renderer);
          }, $notifications);
      }
code: private function get_notifications($user) : array {
          $notifications = $this->notifications;
          $discussion = $this->discussion;
          $forum = $this->forum;
          $renderer = $this->renderer;
  
          if ($forum->is_cutoff_date_reached()) {
              $notifications[] = (new notification(
                      get_string('cutoffdatereached', 'forum'),
                      notification::NOTIFY_INFO
              ))->set_show_closebutton();
          } else if ($forum->is_due_date_reached()) {
              $notifications[] = (new notification(
                      get_string('thisforumisdue', 'forum', userdate($forum->get_due_date())),
                      notification::NOTIFY_INFO
              ))->set_show_closebutton();
          } else if ($forum->has_due_date()) {
              $notifications[] = (new notification(
                      get_string('thisforumhasduedate', 'forum', userdate($forum->get_due_date())),
                      notification::NOTIFY_INFO
              ))->set_show_closebutton();
          }
  
          if ($forum->is_discussion_locked($discussion)) {
              $notifications[] = (new notification(
                  get_string('discussionlocked', 'forum'),
                  notification::NOTIFY_INFO
              ))
              ->set_extra_classes(['discussionlocked'])
              ->set_show_closebutton();
          }
  
          if ($forum->get_type() == 'qanda') {
              if ($this->capabilitymanager->must_post_before_viewing_discussion($user, $discussion)) {
                  $notifications[] = (new notification(
                      get_string('qandanotify', 'forum')
                  ))->set_show_closebutton(true);
              }
          }
  
          if ($forum->has_blocking_enabled()) {
              $notifications[] = (new notification(
                  get_string('thisforumisthrottled', 'forum', [
                      'blockafter' => $forum->get_block_after(),
                      'blockperiod' => get_string('secondstotime' . $forum->get_block_period())
                  ])
              ))->set_show_closebutton();
          }
  
          return array_map(function($notification) {
              return $notification->export_for_template($this->renderer);
          }, $notifications);
      }
code_tokens: private function get_notifications ( $ user ) : array { $ notifications = $ this -> notifications ; $ discussion = $ this -> discussion ; $ forum = $ this -> forum ; $ renderer = $ this -> renderer ; if ( $ forum -> is_cutoff_date_reached ( ) ) { $ notifications [ ] = ( new notification ( get_string ( 'cutoffdatereached' , 'forum' ) , notification :: NOTIFY_INFO ) ) -> set_show_closebutton ( ) ; } else if ( $ forum -> is_due_date_reached ( ) ) { $ notifications [ ] = ( new notification ( get_string ( 'thisforumisdue' , 'forum' , userdate ( $ forum -> get_due_date ( ) ) ) , notification :: NOTIFY_INFO ) ) -> set_show_closebutton ( ) ; } else if ( $ forum -> has_due_date ( ) ) { $ notifications [ ] = ( new notification ( get_string ( 'thisforumhasduedate' , 'forum' , userdate ( $ forum -> get_due_date ( ) ) ) , notification :: NOTIFY_INFO ) ) -> set_show_closebutton ( ) ; } if ( $ forum -> is_discussion_locked ( $ discussion ) ) { $ notifications [ ] = ( new notification ( get_string ( 'discussionlocked' , 'forum' ) , notification :: NOTIFY_INFO ) ) -> set_extra_classes ( [ 'discussionlocked' ] ) -> set_show_closebutton ( ) ; } if ( $ forum -> get_type ( ) == 'qanda' ) { if ( $ this -> capabilitymanager -> must_post_before_viewing_discussion ( $ user , $ discussion ) ) { $ notifications [ ] = ( new notification ( get_string ( 'qandanotify' , 'forum' ) ) ) -> set_show_closebutton ( true ) ; } } if ( $ forum -> has_blocking_enabled ( ) ) { $ notifications [ ] = ( new notification ( get_string ( 'thisforumisthrottled' , 'forum' , [ 'blockafter' => $ forum -> get_block_after ( ) , 'blockperiod' => get_string ( 'secondstotime' . $ forum -> get_block_period ( ) ) ] ) ) ) -> set_show_closebutton ( ) ; } return array_map ( function ( $ notification ) { return $ notification -> export_for_template ( $ this -> renderer ) ; } , $ notifications ) ; }
docstring: Get a list of notification HTML to render in the page.
  
  @param stdClass $user The user viewing the discussion
  @return string[]
docstring_tokens: Get a list of notification HTML to render in the page .