public function ContentTranslationSynchronizedFieldsConstraintValidator::getSynchronizedPropertiesByField in Drupal 9
Same name and namespace in other branches
- 8 core/modules/content_translation/src/Plugin/Validation/Constraint/ContentTranslationSynchronizedFieldsConstraintValidator.php \Drupal\content_translation\Plugin\Validation\Constraint\ContentTranslationSynchronizedFieldsConstraintValidator::getSynchronizedPropertiesByField()
Returns the synchronized properties for every specified field.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface[] $field_definitions: An array of field definitions.
Return value
string[][] An associative array of arrays of field property names keyed by field name.
1 call to ContentTranslationSynchronizedFieldsConstraintValidator::getSynchronizedPropertiesByField()
- ContentTranslationSynchronizedFieldsConstraintValidator::validate in core/
modules/ content_translation/ src/ Plugin/ Validation/ Constraint/ ContentTranslationSynchronizedFieldsConstraintValidator.php
File
- core/
modules/ content_translation/ src/ Plugin/ Validation/ Constraint/ ContentTranslationSynchronizedFieldsConstraintValidator.php, line 221
Class
- ContentTranslationSynchronizedFieldsConstraintValidator
- Checks that synchronized fields are handled correctly in pending revisions.
Namespace
Drupal\content_translation\Plugin\Validation\ConstraintCode
public function getSynchronizedPropertiesByField(array $field_definitions) {
$synchronizer = $this->synchronizer;
$synchronized_properties = array_filter(array_map(function (FieldDefinitionInterface $field_definition) use ($synchronizer) {
return $synchronizer
->getFieldSynchronizedProperties($field_definition);
}, $field_definitions));
return $synchronized_properties;
}