Skip to content
Snippets Groups Projects
Commit dce6a79e authored by Iyyappan Matheri Govindasamy's avatar Iyyappan Matheri Govindasamy Committed by Ilcho Vuchkov
Browse files

Issue #3325125 by iyyappan.govind, vuil: No link template 'canonical' found entity type

parent b7442e2b
No related branches found
No related tags found
No related merge requests found
......@@ -146,4 +146,11 @@ class SmartReadMoreLinkFormatter extends FormatterBase {
return $elements;
}
/**
* {@inheritdoc}
*/
public static function isApplicable(FieldDefinitionInterface $field_definition) {
$storage = \Drupal::entityTypeManager()->getStorage($field_definition->get('entity_type'));
return $storage->getEntityType()->hasLinkTemplate('canonical');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment