You are here

public function SplashifyInjection::getAttach in Splashify 8.2

Returns render element.

If this method is called it is considered that splash was shown.

Return value

array

File

src/Service/SplashifyInjection.php, line 223

Class

SplashifyInjection
Class SplashifyInjection.

Namespace

Drupal\splashify\Service

Code

public function getAttach() {
  if (!$this
    ->isSplashExist()) {
    return [];
  }
  setcookie("splashify[" . $this->splash
    ->id() . "]", REQUEST_TIME, NULL, '/');
  return $this
    ->getRenderElement($this->splash);
}