You are here

public function StartController::info in Acquia Connector 8

Same name and namespace in other branches
  1. 8.2 src/Controller/StartController.php \Drupal\acquia_connector\Controller\StartController::info()
  2. 3.x src/Controller/StartController.php \Drupal\acquia_connector\Controller\StartController::info()

Callback for acquia_connector.start route.

1 string reference to 'StartController::info'
acquia_connector.routing.yml in ./acquia_connector.routing.yml
acquia_connector.routing.yml

File

src/Controller/StartController.php, line 16

Class

StartController
Acquia Start Wizard Page.

Namespace

Drupal\acquia_connector\Controller

Code

public function info() {
  $build = [];
  $build['#title'] = $this
    ->t('Get an Acquia Cloud Free subscription');
  $path = drupal_get_path('module', 'acquia_connector');
  $build['#attached']['library'][] = 'acquia_connector/acquia_connector.form';
  $banner = [
    '#theme' => 'image',
    '#attributes' => [
      'src' => Url::fromUri('base:' . $path . '/images/action.png', [
        'absolute' => TRUE,
      ])
        ->toString(),
    ],
  ];
  $uri = Url::fromRoute('acquia_connector.setup', [], [
    'absolute' => TRUE,
  ])
    ->toString();
  $banner = '<a href="' . $uri . '">' . render($banner) . '</a>';
  $output = '<div class="an-start-form">';
  $output .= '<div class="an-pg-container">';
  $output .= '<div class="an-wrapper">';
  $output .= '<h2 class="an-info-header">' . $this
    ->t('Acquia Subscription', [
    '@acquia-network' => 'https://www.acquia.com/customer-success',
  ]) . '</h2>';
  $output .= '<p class="an-slogan">' . $this
    ->t('A suite of products and services to create & maintain killer web experiences built on Drupal') . '</p>';
  $output .= '<div class="an-info-box">';
  $output .= '<div class="cell with-arrow an-left">';
  $output .= '<h2 class="cell-title"><i>' . $this
    ->t('Answers you need') . '</i></h2>';
  $image = [
    '#theme' => 'image',
    '#attributes' => [
      'src' => Url::fromUri('base:' . $path . '/images/icon-library.png', [
        'absolute' => TRUE,
      ])
        ->toString(),
    ],
  ];
  $output .= '<a href="https://docs.acquia.com" target="_blank">' . render($image) . '</a>';
  $output .= '<p class="cell-p">' . $this
    ->t("Tap the collective knowledge of Acquia’s technical support team & partners.") . '</p>';
  $output .= '</div>';
  $output .= '<div class="cell with-arrow an-center">';
  $output .= '<h2 class="cell-title"><i>' . $this
    ->t('Tools to extend your site') . '</i></h2>';
  $image = [
    '#theme' => 'image',
    '#attributes' => [
      'src' => Url::fromUri('base:' . $path . '/images/icon-tools.png', [
        'absolute' => TRUE,
      ])
        ->toString(),
    ],
  ];
  $output .= '<a href="https://www.acquia.com/customer-success" target="_blank">' . render($image) . '</a>';
  $output .= '<p class="cell-p">' . $this
    ->t('Enhance and extend your site with an array of <a href=":services" target="_blank">services</a> from Acquia & our partners.', [
    ':services' => 'https://www.acquia.com/products-services/acquia-cloud',
  ]) . '</p>';
  $output .= '</div>';
  $output .= '<div class="cell an-right">';
  $output .= '<h2 class="cell-title"><i>' . $this
    ->t('Support when you want it') . '</i></h2>';
  $image = [
    '#theme' => 'image',
    '#attributes' => [
      'src' => Url::fromUri('base:' . $path . '/images/icon-support.png', [
        'absolute' => TRUE,
      ])
        ->toString(),
    ],
  ];
  $output .= '<a href="https://support.acquia.com" target="_blank">' . render($image) . '</a>';
  $output .= '<p class="cell-p">' . $this
    ->t("Experienced Drupalists are available to support you whenever you need it.") . '</p>';
  $output .= '</div>';
  $output .= '</div>';
  $output .= '</div>';
  $output .= '<div class="an-pg-banner">';
  $output .= $banner;
  $output .= '</div>';
  $output .= '</div>';
  $output .= '</div>';
  $build['output'] = [
    '#markup' => $output,
  ];
  return $build;
}