You are here

public function ContentSyncHelpManager::buildAbout in Content Synchronization 3.0.x

Same name and namespace in other branches
  1. 8.2 src/ContentSyncHelpManager.php \Drupal\content_sync\ContentSyncHelpManager::buildAbout()
  2. 8 src/ContentSyncHelpManager.php \Drupal\content_sync\ContentSyncHelpManager::buildAbout()

Build the about section.

Return value

array An render array containing the about section.

Overrides ContentSyncHelpManagerInterface::buildAbout

1 call to ContentSyncHelpManager::buildAbout()
ContentSyncHelpManager::buildIndex in src/ContentSyncHelpManager.php
Build the main help page for the Content Sync module.

File

src/ContentSyncHelpManager.php, line 330

Class

ContentSyncHelpManager
Content Sync help manager.

Namespace

Drupal\content_sync

Code

public function buildAbout() {
  $menu = $this
    ->buildHelpMenu();
  $links = $menu['operations']['#links'];
  $link_base = [
    '#type' => 'link',
    '#attributes' => [
      'class' => [
        'button',
        'button--primary',
      ],
    ],
    '#suffix' => '<br/><br/><hr/>',
  ];
  $build = [
    'title' => [
      '#markup' => $this
        ->t('How can we help you?'),
      '#prefix' => '<h2 id="about">',
      '#suffix' => '</h2>',
    ],
    'content' => [
      '#prefix' => '<div>',
      '#suffix' => '</div>',
    ],
  ];

  //$build['content']['quote'] = [];

  //$build['content']['quote']['image'] = [

  //  '#theme' => 'image',
  //  '#uri' => 'https://pbs.twimg.com/media/C-RXmp7XsAEgMN2.jpg',
  //  '#alt' => $this->t('DrupalCon Baltimore'),
  //  '#prefix' => '<p>',
  //  '#suffix' => '</p>',

  //];

  //$build['content']['quote']['content']['#markup'] = '<blockquote><strong>' . $this->t('It’s really the Drupal community and not so much the software that makes the Drupal project what it is. So fostering the Drupal community is actually more important than just managing the code base.') . '</strong><address>' . $this->t('- Dries Buytaert') . '</address></blockquote><hr/>';

  // Content Sync.
  $build['content']['content_sync'] = [];
  $build['content']['content_sync']['title']['#markup'] = '<h3>' . $this
    ->t('Need help with the Content Sync module?') . '</h3>';
  $build['content']['content_sync']['content']['#markup'] = '<p>' . $this
    ->t('The best place to start is by reading the documentation, watching the help videos, and looking at the examples and templates included in the content sync module.') . '</p>';
  $build['content']['content_sync']['link'] = $link_base + [
    '#url' => Url::fromUri('https://www.drupal.org/project/content_sync'),
    '#title' => $this
      ->t('Get help with the Content Sync module'),
  ];

  // Help.

  /* if ($help_video = $this->buildAboutVideo('uQo-1s2h06E')) {
       $build['content']['help'] = [];
       $build['content']['help']['title']['#markup'] = '<h3>' . $this->t('Help us help you') . '</h3>';
       $build['content']['help']['video'] = $this->buildAboutVideo('uQo-1s2h06E');
       $build['content']['help']['#suffix'] = '<hr/>';
     }*/

  // Issue.
  $build['content']['issue'] = [];
  $build['content']['issue']['title']['#markup'] = '<h3>' . $this
    ->t('How can you report bugs and issues?') . '</h3>';
  $build['content']['issue']['content']['#markup'] = '<p>' . $this
    ->t('The first step is to review the Content Sync module’s issue queue for similar issues. You may be able to find a patch or other solution there. You may also be able to contribute to an existing issue with your additional details.') . '</p>' . '<p>' . $this
    ->t('If you need to create a new issue, please make and export example of the faulty functionality/YAML files. This will help guarantee that your issue is reproducible. To get the best response, it’s helpful to craft a good issue report. You can find advice and tips on the <a href="https://www.drupal.org/node/73179">How to create a good issue page</a>. Please use the issue summary template when creating new issues.') . '</p>';
  $build['content']['issue']['link'] = $link_base + [
    '#url' => $links['issue']['url'],
    '#title' => $this
      ->t('Report a bug/issue with the Content Sync module'),
  ];

  // Request.
  $build['content']['request'] = [];
  $build['content']['request']['title']['#markup'] = '<h3>' . $this
    ->t('How can you request a feature?') . '</h3>';
  $build['content']['request']['content']['#markup'] = '<p>' . $this
    ->t('Feature requests can be added to the Content Sync module\'s issue queue. Use the same tips provided for creating issue reports to help you author a feature request. The better you can define your needs and ideas, the easier it will be for people to help you.') . '</p>';
  $build['content']['request']['link'] = $link_base + [
    '#url' => $links['request']['url'],
    '#title' => $this
      ->t('Help improve the ContentSync module'),
  ];

  /*
  // Community.
  $build['content']['community'] = [];
  $build['content']['community']['title']['#markup'] = '<h3>' . $this->t('Are you new to Drupal?') . '</h3>';
  $build['content']['community']['content']['#markup'] = '<p>' . $this->t('As an open source project, we don’t have employees to provide Drupal improvements and support. We depend on our diverse community of passionate volunteers to move the project forward. Volunteers work not just on web development and user support but also on many other contributions and interests such as marketing, organising user groups and camps, speaking at events, maintaining documentation, and helping to review issues.') . '</p>';
  $build['content']['community']['link'] = $link_base + [
    '#url' => Url::fromUri('https://www.drupal.org/getting-involved'),
    '#title' => $this->t('Get involved in the Drupal community'),
  ];

  // Register.
  $build['content']['register'] = [];
  $build['content']['register']['title']['#markup'] = '<h3>' . $this->t('Start by creating your Drupal.org user account') . '</h3>';
  $build['content']['register']['content']['#markup'] = '<p>' . $this->t('When you create a Drupal.org account, you gain access to a whole ecosystem of Drupal.org sites and services. Your account works on Drupal.org and any of its subsites including Drupal Groups, Drupal Jobs, Drupal Association and more.') . '</p>';
  $build['content']['register']['link'] = $link_base + [
    '#url' => $links['community']['url'],
    '#title' => $this->t('Become a member of the Drupal community'),
  ];

  // Association.
  $build['content']['association'] = [];
  $build['content']['association']['title']['#markup'] = '<h3>' . $this->t('Join the Drupal Association') . '</h3>';
  $build['content']['association']['content'] = [
    'content' => ['#markup' => $this->t('The Drupal Association is dedicated to fostering and supporting the Drupal software project, the community, and its growth. We help the Drupal community with funding, infrastructure, education, promotion, distribution, and online collaboration at Drupal.org.')],
    '#prefix' => '<p>',
    '#suffix' => '</p>',
  ];
  $build['content']['association']['video'] = $this->buildAboutVideo('LZWqFSMul84');
  $build['content']['association']['link'] = $link_base + [
    '#url' => $links['association']['url'],
    '#title' => $this->t('Learn more about the Drupal Association'),
  ];
  */
  return $build;
}