public static function CustomMultiValue::isApplicable in CiviCRM Entity 8.3
Returns if the formatter 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 formatter can be used, FALSE otherwise.
Overrides FormatterBase::isApplicable
File
- src/
Plugin/ Field/ FieldFormatter/ CustomMultiValue.php, line 82
Class
- CustomMultiValue
- Plugin implementation of the 'civicrm_entity_custom_multi_value' formatter.
Namespace
Drupal\civicrm_entity\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
if (($field_metadata = $field_definition
->getSetting('civicrm_entity_field_metadata')) && $field_metadata['option_group_id']) {
return TRUE;
}
return FALSE;
}