protected function AcquiaContentHubExcludeLingotekContentMetadataFromSerializationSubscriber::includeField in Lingotek Translation 3.7.x
Same name and namespace in other branches
- 4.0.x src/EventSubscriber/AcquiaContentHubExcludeLingotekContentMetadataFromSerializationSubscriber.php \Drupal\lingotek\EventSubscriber\AcquiaContentHubExcludeLingotekContentMetadataFromSerializationSubscriber::includeField()
- 3.6.x src/EventSubscriber/AcquiaContentHubExcludeLingotekContentMetadataFromSerializationSubscriber.php \Drupal\lingotek\EventSubscriber\AcquiaContentHubExcludeLingotekContentMetadataFromSerializationSubscriber::includeField()
- 3.8.x src/EventSubscriber/AcquiaContentHubExcludeLingotekContentMetadataFromSerializationSubscriber.php \Drupal\lingotek\EventSubscriber\AcquiaContentHubExcludeLingotekContentMetadataFromSerializationSubscriber::includeField()
Whether we should include this field in the dependency calculation.
Parameters
\Drupal\Core\Field\FieldItemListInterface $field: The entity field.
Return value
bool TRUE if we should include the field, FALSE otherwise.
1 call to AcquiaContentHubExcludeLingotekContentMetadataFromSerializationSubscriber::includeField()
- AcquiaContentHubExcludeLingotekContentMetadataFromSerializationSubscriber::onSerializeContentField in src/
EventSubscriber/ AcquiaContentHubExcludeLingotekContentMetadataFromSerializationSubscriber.php - Serialize content field event.
File
- src/
EventSubscriber/ AcquiaContentHubExcludeLingotekContentMetadataFromSerializationSubscriber.php, line 46
Class
Namespace
Drupal\lingotek\EventSubscriberCode
protected function includeField(FieldItemListInterface $field) {
$definition = $field
->getFieldDefinition();
if ($definition
->getType() === 'entity_reference' && $field
->getSetting('target_type') === 'lingotek_content_metadata') {
return FALSE;
}
return TRUE;
}