public function ContentHubEntityEmbedHandler::isProcessable in Acquia Content Hub 8
Can given field contain entity_embed markup.
Return value
bool Will return TRUE if we can process this field.
File
- src/
ContentHubEntityEmbedHandler.php, line 116
Class
- ContentHubEntityEmbedHandler
- Content Hub Entity Embed Handler Class.
Namespace
Drupal\acquia_contenthubCode
public function isProcessable() {
// Check if field not set properly.
if ($this->field == NULL) {
return FALSE;
}
$field_type = $this->field
->getFieldDefinition()
->getType();
// Field types to process.
$types = [
'text_with_summary',
'string_long',
'text_long',
];
return in_array($field_type, $types);
}