You are here

protected function BackLinkBlock::setOverrideJS in Opigno Learning path 3.x

1 call to BackLinkBlock::setOverrideJS()
BackLinkBlock::isOverrideJS in src/Plugin/Block/BackLinkBlock.php

File

src/Plugin/Block/BackLinkBlock.php, line 120

Class

BackLinkBlock
Provides a backlinkblock block.

Namespace

Drupal\opigno_learning_path\Plugin\Block

Code

protected function setOverrideJS() {

  // Add the route name as an extra class to body.
  $route = (string) \Drupal::routeMatch()
    ->getRouteName();
  return $this->isOverrideJS = !in_array($route, preg_split('/\\n|\\r\\n?/', $this->configuration['js_button']));
}