Loading core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php +8 −1 Original line number Diff line number Diff line Loading @@ -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', Loading Loading
core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php +8 −1 Original line number Diff line number Diff line Loading @@ -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', Loading