<?php

use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Url;
use Drupal\Core\Form\FormStateInterface;

/**
 * Implements hook_help().
 */
function azure_ad_help($route_name, RouteMatchInterface $route_match)
{
    switch ($route_name){
        case 'help.page.azure_ad':
            $url = Url::fromRoute('user.admin_index')->toString();
            $moduleLink = $url . '/azure_ad/azure_upgrade_plans';

            $output = '<h3>' . t('About') . '</h3>';
            $output .= '<p>' . t('The miniOrange Azure Sync module offers bidirectional user synchronization between your Azure AD/B2C and your Drupal site using Microsoft Graph APIs. Make sure to check out the list of <a href="'.$moduleLink.'" target="_blank">supported features and integrations</a> to increase the functionality of your Drupal site');
            return $output;
    }
}