Loading CHANGELOG.md +2 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ ## [Unreleased] ### Changed - [#3256203]: Use EntityOwnerTrait method instead the custom one for setting default value - [#3079282] by lakeloafer: PubMed abst_e field - contains basic html ### Fixed Loading Loading @@ -786,3 +787,4 @@ Add description to reference types, prefill it with sensible defaults. On refere [//]: # "Issues links dev" [#3212586]: https://www.drupal.org/node/3212586 [#3079282]: https://www.drupal.org/node/3079282 [#3256203]: https://www.drupal.org/node/3256203 modules/bibcite_entity/src/Entity/Reference.php +3 −2 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ use Drupal\Core\Entity\EditorialContentEntityBase; use Drupal\Core\Entity\EntityChangedTrait; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\user\EntityOwnerTrait; use Drupal\user\UserInterface; /** Loading Loading @@ -87,7 +88,7 @@ class Reference extends EditorialContentEntityBase implements ReferenceInterface use EntityChangedTrait; use EntityPublishedTrait; // @todo Also use \Drupal\user\EntityOwnerTrait ? use EntityOwnerTrait; /** * Whether the reference is being previewed or not. Loading Loading @@ -192,7 +193,7 @@ class Reference extends EditorialContentEntityBase implements ReferenceInterface ->setDescription(t('The username of the content author.')) ->setRevisionable(TRUE) ->setSetting('target_type', 'user') ->setDefaultValueCallback('Drupal\bibcite_entity\Entity\Reference::getCurrentUserId') ->setDefaultValueCallback('Drupal\bibcite_entity\Entity\Reference::getDefaultEntityOwner') ->setDisplayOptions('form', [ 'type' => 'entity_reference_autocomplete', 'weight' => 100, Loading Loading
CHANGELOG.md +2 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ ## [Unreleased] ### Changed - [#3256203]: Use EntityOwnerTrait method instead the custom one for setting default value - [#3079282] by lakeloafer: PubMed abst_e field - contains basic html ### Fixed Loading Loading @@ -786,3 +787,4 @@ Add description to reference types, prefill it with sensible defaults. On refere [//]: # "Issues links dev" [#3212586]: https://www.drupal.org/node/3212586 [#3079282]: https://www.drupal.org/node/3079282 [#3256203]: https://www.drupal.org/node/3256203
modules/bibcite_entity/src/Entity/Reference.php +3 −2 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ use Drupal\Core\Entity\EditorialContentEntityBase; use Drupal\Core\Entity\EntityChangedTrait; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\user\EntityOwnerTrait; use Drupal\user\UserInterface; /** Loading Loading @@ -87,7 +88,7 @@ class Reference extends EditorialContentEntityBase implements ReferenceInterface use EntityChangedTrait; use EntityPublishedTrait; // @todo Also use \Drupal\user\EntityOwnerTrait ? use EntityOwnerTrait; /** * Whether the reference is being previewed or not. Loading Loading @@ -192,7 +193,7 @@ class Reference extends EditorialContentEntityBase implements ReferenceInterface ->setDescription(t('The username of the content author.')) ->setRevisionable(TRUE) ->setSetting('target_type', 'user') ->setDefaultValueCallback('Drupal\bibcite_entity\Entity\Reference::getCurrentUserId') ->setDefaultValueCallback('Drupal\bibcite_entity\Entity\Reference::getDefaultEntityOwner') ->setDisplayOptions('form', [ 'type' => 'entity_reference_autocomplete', 'weight' => 100, Loading