protected function contextHandler() { return \Drupal::
service('context.handler'
);
} /**
* See \Drupal\Core\Plugin\Context\ContextAwarePluginManagerInterface::getDefinitionsForContexts().
*/
public function getDefinitionsForContexts(array
$contexts =
[]) { return $this->
contextHandler()->
filterPluginDefinitionsByContexts($contexts,
$this->
getDefinitions());
} /**
* See \Drupal\Component\Plugin\Discovery\DiscoveryInterface::getDefinitions().
*/
abstract public function getDefinitions();
}