You are here

public function SendinblueController::home in SendinBlue 8

Same name and namespace in other branches
  1. 8.2 src/Controller/SendinblueController.php \Drupal\sendinblue\Controller\SendinblueController::home()

Return cusotm page if user ligin or logout.

1 string reference to 'SendinblueController::home'
sendinblue.routing.yml in ./sendinblue.routing.yml
sendinblue.routing.yml

File

src/Controller/SendinblueController.php, line 67

Class

SendinblueController
Returns responses for entity browser routes.

Namespace

Drupal\sendinblue\Controller

Code

public function home() {
  if ($this->sendinblueManager
    ->isLoggedInState()) {
    $home_controller = $this->sendinblueManager
      ->generateHomeLogin();
    $home_controller['#theme'] = 'generateHomeLogin';
  }
  else {
    $home_controller = $this->sendinblueManager
      ->generateHomeLogout();
    $home_controller['#theme'] = 'generateHomeLogout';
  }
  return $home_controller;
}