You are here

public function AdminRoutes::evaluate in Administration Language Negotiation 8

Evaluates the condition and returns TRUE or FALSE accordingly.

Return value

bool TRUE if the condition has been met, FALSE otherwise.

Overrides AdministrationLanguageNegotiationConditionBase::evaluate

File

src/Plugin/AdministrationLanguageNegotiationCondition/AdminRoutes.php, line 115

Class

AdminRoutes
Class for the Blacklisted paths condition plugin.

Namespace

Drupal\administration_language_negotiation\Plugin\AdministrationLanguageNegotiationCondition

Code

public function evaluate() {
  $active = $this->configuration[$this
    ->getPluginId()];
  return $active && $this
    ->isAdminRoute() ? $this
    ->block() : $this
    ->pass();
}