public static function MiconMenuWidget::isApplicable in Micon 2.x
Same name and namespace in other branches
- 8 micon_menu/src/Plugin/Field/FieldWidget/MiconMenuWidget.php \Drupal\micon_menu\Plugin\Field\FieldWidget\MiconMenuWidget::isApplicable()
Returns if the widget can be used for the provided field.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition that should be checked.
Return value
bool TRUE if the widget can be used, FALSE otherwise.
Overrides WidgetBase::isApplicable
File
- micon_menu/
src/ Plugin/ Field/ FieldWidget/ MiconMenuWidget.php, line 62
Class
- MiconMenuWidget
- Plugin implementation of the 'link' widget.
Namespace
Drupal\micon_menu\Plugin\Field\FieldWidgetCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
// Only make this widget available to menu_link_content.
return $field_definition
->getTargetEntityTypeId() == 'menu_link_content';
}