public function PathContext::shouldAttach in Acquia Lift Connector 8.4
Same name and namespace in other branches
- 8 src/Service/Context/PathContext.php \Drupal\acquia_lift\Service\Context\PathContext::shouldAttach()
- 8.3 src/Service/Context/PathContext.php \Drupal\acquia_lift\Service\Context\PathContext::shouldAttach()
Should attach.
Return value
boolean True if should attach.
File
- src/
Service/ Context/ PathContext.php, line 90
Class
Namespace
Drupal\acquia_lift\Service\ContextCode
public function shouldAttach() {
// Should not attach if credential is invalid.
if (SettingsHelper::isInvalidCredential($this->credentialSettings)) {
return FALSE;
}
// Should not attach if current path match the path patterns.
if ($this->pathMatcher
->match($this->currentPath, $this->requestPathPatterns)) {
return FALSE;
}
// Should attach.
return TRUE;
}