Guest User

Untitled

a guest
Dec 14th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. protected function getApplicablePluginOptions(FieldDefinitionInterface $field_definition) {
  2. $options = $this->pluginManager->getOptions($field_definition->getType());
  3. $applicable_options = [];
  4. foreach ($options as $option => $label) {
  5. $plugin_class = DefaultFactory::getPluginClass($option, $this->pluginManager->getDefinition($option));
  6. if ($plugin_class::isApplicable($field_definition)) {
  7. $applicable_options[$option] = $label;
  8. }
  9. }
  10. return $applicable_options;
Add Comment
Please, Sign In to add comment