FieldDefinition::setDisplayOptions()
says that $options
should include at least a 'weight', or specify 'type' = 'hidden'.
FieldDefinitionInterface::getDisplayOptions()
, instead, says that 'hidden' was a valid value, but it is now deprecated in favor of specifying 'region' => 'hidden'.
The first page should be corrected not to conflict what the last page says.
array $options: An array of display options. Refer to \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for a list of supported keys. The options should include at least a 'weight', or specify 'region' = 'hidden'. The 'default_widget' / 'default_formatter' for the field type will be used if no 'type' is specified.
Comment | File | Size | Author |
---|---|---|---|
#2 | drupal-not-reference-a-deprecated-settings-3105925-2.patch | 789 bytes | apaderno |
Comments
Comment #2
apadernoComment #3
joachim CreditAttribution: joachim commentedGood catch!
Comment #4
alexpottCommitted and pushed d7f58c36ff to 9.0.x and 295a6c45de to 8.9.x and ab2cefd0ca to 8.8.x. Thanks!
Yep this looks great - see the CR that changed this https://www.drupal.org/node/2801513