function BigPipeHooks::help

Implements hook_help().

File

core/modules/big_pipe/src/Hook/BigPipeHooks.php, line 21

Class

BigPipeHooks
Hook implementations for big_pipe.

Namespace

Drupal\big_pipe\Hook

Code

public function help($route_name, RouteMatchInterface $route_match) : ?string {
    switch ($route_name) {
        case 'help.page.big_pipe':
            $output = '<h2>' . $this->t('About') . '</h2>';
            $output .= '<p>' . $this->t('The BigPipe module sends pages with dynamic content in a way that allows browsers to show them much faster. For more information, see the <a href=":big_pipe-documentation">online documentation for the BigPipe module</a>.', [
                ':big_pipe-documentation' => 'https://www.drupal.org/documentation/modules/big_pipe',
            ]) . '</p>';
            $output .= '<h2>' . $this->t('Uses') . '</h2>';
            $output .= '<dl>';
            $output .= '<dt>' . $this->t('Speeding up your site') . '</dt>';
            $output .= '<dd>' . $this->t('The module requires no configuration. Every part of the page contains metadata that allows BigPipe to figure this out on its own.') . '</dd>';
            $output .= '</dl>';
            return $output;
    }
    return NULL;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.