function ContentTranslationSynchronizedFieldsConstraintValidator::getSynchronizedPropertiesByField
Same name in other branches
- 9 core/modules/content_translation/src/Plugin/Validation/Constraint/ContentTranslationSynchronizedFieldsConstraintValidator.php \Drupal\content_translation\Plugin\Validation\Constraint\ContentTranslationSynchronizedFieldsConstraintValidator::getSynchronizedPropertiesByField()
- 8.9.x core/modules/content_translation/src/Plugin/Validation/Constraint/ContentTranslationSynchronizedFieldsConstraintValidator.php \Drupal\content_translation\Plugin\Validation\Constraint\ContentTranslationSynchronizedFieldsConstraintValidator::getSynchronizedPropertiesByField()
- 11.x 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 222
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.