Skip to content
Snippets Groups Projects
Commit 2fa36579 authored by Mateu Aguiló Bosch's avatar Mateu Aguiló Bosch
Browse files

docs: change todo item

parent 955ba867
No related branches found
No related tags found
No related merge requests found
...@@ -85,7 +85,7 @@ class FieldValueVariantCondition implements VariantConditionInterface, ContextAw ...@@ -85,7 +85,7 @@ class FieldValueVariantCondition implements VariantConditionInterface, ContextAw
assert($entity instanceof FieldableEntityInterface); assert($entity instanceof FieldableEntityInterface);
// Check if the any of the values for the field match the configured value. // Check if the any of the values for the field match the configured value.
$values = $entity->get($this->fieldName)->getValue(); $values = $entity->get($this->fieldName)->getValue();
// TODO: explore the field configuration to learn about the main property. // TODO: inject the field manager for testability.
$field_manager = \Drupal::service('entity_field.manager'); $field_manager = \Drupal::service('entity_field.manager');
assert($field_manager instanceof EntityFieldManager); assert($field_manager instanceof EntityFieldManager);
$definition = $field_manager->getFieldStorageDefinitions($entity->getEntityTypeId())[$this->fieldName]; $definition = $field_manager->getFieldStorageDefinitions($entity->getEntityTypeId())[$this->fieldName];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment