original_string: public static function fetch_notifications($contextid) {
          global $PAGE;
  
          self::validate_parameters(self::fetch_notifications_parameters(), [
                  'contextid' => $contextid,
              ]);
  
          $context = \context::instance_by_id($contextid);
          self::validate_context($context);
  
          return \core\notification::fetch_as_array($PAGE->get_renderer('core'));
      }
code: public static function fetch_notifications($contextid) {
          global $PAGE;
  
          self::validate_parameters(self::fetch_notifications_parameters(), [
                  'contextid' => $contextid,
              ]);
  
          $context = \context::instance_by_id($contextid);
          self::validate_context($context);
  
          return \core\notification::fetch_as_array($PAGE->get_renderer('core'));
      }
code_tokens: public static function fetch_notifications ( $ contextid ) { global $ PAGE ; self :: validate_parameters ( self :: fetch_notifications_parameters ( ) , [ 'contextid' => $ contextid , ] ) ; $ context = \ context :: instance_by_id ( $ contextid ) ; self :: validate_context ( $ context ) ; return \ core \ notification :: fetch_as_array ( $ PAGE -> get_renderer ( 'core' ) ) ; }
docstring: Returns the list of notifications against the current session.
  
  @return array
  @since Moodle 3.1
docstring_tokens: Returns the list of notifications against the current session .