return FALSE;
} } return TRUE;
} /**
* {@inheritdoc}
*/
public function getMatchingContexts(array
$contexts, ContextDefinitionInterface
$definition) { return array_filter($contexts,
function DContextInterface
$context) use ($definition) { return $definition->
isSatisfiedBy($context);
});
} /**
* {@inheritdoc}
*/
public function applyContextMapping(ContextAwarePluginInterface
$plugin,
$contexts,
$mappings =
[]) { /** @var \Drupal\Core\Plugin\Context\ContextInterface[] $contexts */
$mappings +=
$plugin->
getContextMapping();
// Loop through each of the expected contexts.