protected function LingotekContentMetadataFieldItemList::computeLingotekMetadataFieldItemList in Lingotek Translation 3.3.x
Same name and namespace in other branches
- 8.2 src/Plugin/Field/LingotekContentMetadataFieldItemList.php \Drupal\lingotek\Plugin\Field\LingotekContentMetadataFieldItemList::computeLingotekMetadataFieldItemList()
- 4.0.x src/Plugin/Field/LingotekContentMetadataFieldItemList.php \Drupal\lingotek\Plugin\Field\LingotekContentMetadataFieldItemList::computeLingotekMetadataFieldItemList()
- 3.0.x src/Plugin/Field/LingotekContentMetadataFieldItemList.php \Drupal\lingotek\Plugin\Field\LingotekContentMetadataFieldItemList::computeLingotekMetadataFieldItemList()
- 3.1.x src/Plugin/Field/LingotekContentMetadataFieldItemList.php \Drupal\lingotek\Plugin\Field\LingotekContentMetadataFieldItemList::computeLingotekMetadataFieldItemList()
- 3.2.x src/Plugin/Field/LingotekContentMetadataFieldItemList.php \Drupal\lingotek\Plugin\Field\LingotekContentMetadataFieldItemList::computeLingotekMetadataFieldItemList()
- 3.4.x src/Plugin/Field/LingotekContentMetadataFieldItemList.php \Drupal\lingotek\Plugin\Field\LingotekContentMetadataFieldItemList::computeLingotekMetadataFieldItemList()
- 3.5.x src/Plugin/Field/LingotekContentMetadataFieldItemList.php \Drupal\lingotek\Plugin\Field\LingotekContentMetadataFieldItemList::computeLingotekMetadataFieldItemList()
- 3.6.x src/Plugin/Field/LingotekContentMetadataFieldItemList.php \Drupal\lingotek\Plugin\Field\LingotekContentMetadataFieldItemList::computeLingotekMetadataFieldItemList()
- 3.7.x src/Plugin/Field/LingotekContentMetadataFieldItemList.php \Drupal\lingotek\Plugin\Field\LingotekContentMetadataFieldItemList::computeLingotekMetadataFieldItemList()
- 3.8.x src/Plugin/Field/LingotekContentMetadataFieldItemList.php \Drupal\lingotek\Plugin\Field\LingotekContentMetadataFieldItemList::computeLingotekMetadataFieldItemList()
Recalculate the Lingotek metadata field item list.
2 calls to LingotekContentMetadataFieldItemList::computeLingotekMetadataFieldItemList()
- LingotekContentMetadataFieldItemList::get in src/
Plugin/ Field/ LingotekContentMetadataFieldItemList.php - Returns the item at the specified position in this list.
- LingotekContentMetadataFieldItemList::getIterator in src/
Plugin/ Field/ LingotekContentMetadataFieldItemList.php
File
- src/
Plugin/ Field/ LingotekContentMetadataFieldItemList.php, line 75
Class
- LingotekContentMetadataFieldItemList
- A computed field that provides a content entity's Lingotek metadata.
Namespace
Drupal\lingotek\Plugin\FieldCode
protected function computeLingotekMetadataFieldItemList() {
// Compute the value of the moderation state.
$index = 0;
if (!isset($this->list[$index]) || $this->list[$index]
->isEmpty()) {
$metadata = $this
->getContentMetadata();
// Do not store NULL values in the static cache.
if ($metadata) {
$this->list[$index] = $this
->createItem($index, [
'entity' => $metadata,
]);
}
}
}