You are here

function _instagram_feeds_api_help in Instagram Feeds 8

Helper function to return the module help render array.

Return value

array Render array with module help information.

1 call to _instagram_feeds_api_help()
instagram_feeds_help in ./instagram_feeds.module
Implements hook_help().

File

./instagram_feeds.module, line 41
Hooks and custom functions for instagram_feeds module.

Code

function _instagram_feeds_api_help() : array {
  $element = [
    '#type' => 'details',
    '#title' => t('Instagram App Details'),
  ];
  $element['redirect_uri'] = [
    '#type' => 'item',
    '#title' => t('Valid OAuth Redirect URI'),
    '#markup' => Url::fromRoute('entity.instagram_account.add_form', [], [
      'https' => TRUE,
    ])
      ->setAbsolute()
      ->toString(),
  ];
  $link = [
    '#type' => 'link',
    '#title' => t('Facebook Apps page'),
    '#url' => Url::fromUri('https://developers.facebook.com/apps/'),
    '#attributes' => [
      'target' => '_blank',
    ],
  ];
  $element['fb_app_page'] = [
    '#type' => 'item',
    '#title' => t('Facebook Apps page'),
    '#markup' => \Drupal::service('renderer')
      ->render($link),
  ];
  return $element;
}