Verified Commit e1a109a2 authored by quietone's avatar quietone
Browse files

Issue #3453786 by soham sengupta, drupatz, joachim, smustgrave,...

Issue #3453786 by soham sengupta, drupatz, joachim, smustgrave, rodrigoaguilera: In DefaultSelection document why values for target_bundles NULL and [] behave as they do
parent e43c26dc
Loading
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -143,7 +143,14 @@ public function defaultConfiguration() {
    return [
      // For the 'target_bundles' setting, a NULL value is equivalent to "allow
      // entities from any bundle to be referenced" and an empty array value is
      // equivalent to "no entities from any bundle can be referenced".
      // equivalent to "no entities from any bundle can be referenced". The
      // reason for NULL and an empty array having a different meaning is to
      // correctly handle config updates.
      // For example, in the scenario where a single target bundle is allowed,
      // and that bundle is then deleted, the automatic removal of that bundle
      // from the entity reference field's settings leaves an empty array.
      // This empty array must therefore indicate that no bundles are allowed,
      // as otherwise the field would suddenly allow all bundles.
      'target_bundles' => NULL,
      'sort' => [
        'field' => '_none',