Skip to content
Snippets Groups Projects
Commit 6575115d authored by jurgenhaas's avatar jurgenhaas
Browse files

Add patch to prompt

parent 7ba0bc61
No related branches found
No related tags found
1 merge request!209Merging develop into main
Pipeline #1233041 passed with warnings
......@@ -182,6 +182,9 @@
"drupal/profile": {
"#2899744 Multi-lingual": "https://www.drupal.org/files/issues/2022-04-17/2899744-54.patch"
},
"drupal/prompt": {
"#3449733 ECA 2": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3449733.diff"
},
"drupal/recaptcha": {
"#3113837 Downgrade unknown error": "https://www.drupal.org/files/issues/2020-02-15/3113837-2.recaptcha.Downgrade-unknown-error-info.patch"
},
......
diff --git a/src/Plugin/Action/PromptSetFieldValue.php b/src/Plugin/Action/PromptSetFieldValue.php
index 86155094b87b7da45120e03107982b170fe0973b..c6841a61a1da651917c51e04412eb8a2d94b3a67 100644
--- a/src/Plugin/Action/PromptSetFieldValue.php
+++ b/src/Plugin/Action/PromptSetFieldValue.php
@@ -62,7 +62,7 @@ class PromptSetFieldValue extends SetFieldValue {
* {@inheritdoc}
*/
protected function getFieldsToUpdate() {
- $name = $this->tokenServices->replace($this->configuration['field_name']);
+ $name = $this->tokenService->replace($this->configuration['field_name']);
return [$name => ''];
}
@@ -70,7 +70,7 @@ class PromptSetFieldValue extends SetFieldValue {
* {@inheritdoc}
*/
protected function getValueToUpdate($entity) {
- $name = $this->tokenServices->replace($this->configuration['field_name']);
+ $name = $this->tokenService->replace($this->configuration['field_name']);
$prompt_id = $this->configuration['prompt_id'];
$values = \Drupal::service('prompt.service')->prompt_request($prompt_id, $entity, TRUE);
@@ -78,14 +78,14 @@ class PromptSetFieldValue extends SetFieldValue {
// Process the field values.
$use_token_replace = TRUE;
// Check whether the input wants to directly use defined data.
- if ((mb_substr($values, 0, 1) === '[') && (mb_substr($values, -1, 1) === ']') && (mb_strlen($values) <= 255) && ($data = $this->tokenServices->getTokenData($values))) {
+ if ((mb_substr($values, 0, 1) === '[') && (mb_substr($values, -1, 1) === ']') && (mb_strlen($values) <= 255) && ($data = $this->tokenService->getTokenData($values))) {
if (!($data instanceof TypedDataInterface) || !empty($data->getValue())) {
$use_token_replace = FALSE;
$values = $data;
}
}
if ($use_token_replace) {
- $values = $this->tokenServices->replaceClear($values);
+ $values = $this->tokenService->replaceClear($values);
}
return [$name => $values];
@@ -96,7 +96,7 @@ class PromptSetFieldValue extends SetFieldValue {
*
* @throws \Drupal\Core\Entity\EntityStorageException
*/
- public function execute($entity = NULL) {
+ public function execute(mixed $entity = NULL): void {
if (!($entity instanceof FieldableEntityInterface)) {
return;
}
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