public static function SocialAlbumEntityReferenceLabelFormatter::isApplicable in Open Social 10.3.x
Same name and namespace in other branches
- 10.0.x modules/social_features/social_album/src/Plugin/Field/FieldFormatter/SocialAlbumEntityReferenceLabelFormatter.php \Drupal\social_album\Plugin\Field\FieldFormatter\SocialAlbumEntityReferenceLabelFormatter::isApplicable()
- 10.1.x modules/social_features/social_album/src/Plugin/Field/FieldFormatter/SocialAlbumEntityReferenceLabelFormatter.php \Drupal\social_album\Plugin\Field\FieldFormatter\SocialAlbumEntityReferenceLabelFormatter::isApplicable()
- 10.2.x modules/social_features/social_album/src/Plugin/Field/FieldFormatter/SocialAlbumEntityReferenceLabelFormatter.php \Drupal\social_album\Plugin\Field\FieldFormatter\SocialAlbumEntityReferenceLabelFormatter::isApplicable()
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
- modules/
social_features/ social_album/ src/ Plugin/ Field/ FieldFormatter/ SocialAlbumEntityReferenceLabelFormatter.php, line 62
Class
- SocialAlbumEntityReferenceLabelFormatter
- Plugin implementation of the 'social album entity reference label' formatter.
Namespace
Drupal\social_album\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
$settings = $field_definition
->getSettings();
return $settings['target_type'] === 'node' && $settings['handler'] === 'views' && $settings['handler_settings']['view']['view_name'] === 'albums';
}