ref
This commit is contained in:
@@ -203,7 +203,7 @@ class LinkMultipleSaver
|
||||
}
|
||||
}
|
||||
|
||||
$saveContext = $params->getOption(SaveContext::NAME);
|
||||
$saveContext = SaveContext::obtainFromRawOptions($params->getRawOptions());
|
||||
|
||||
foreach ($toCreateIdList as $id) {
|
||||
$data = null;
|
||||
|
||||
@@ -53,12 +53,9 @@ class Notifications implements AfterSave
|
||||
return;
|
||||
}
|
||||
|
||||
$saveContext = SaveContext::obtainFromOptions($options);
|
||||
|
||||
$saveContext = $options->get(SaveContext::NAME);
|
||||
|
||||
$actionId = $saveContext instanceof SaveContext ? $saveContext->getId() : null;
|
||||
|
||||
$params = new Params(actionId: $actionId);
|
||||
$params = new Params(actionId: $saveContext?->getId());
|
||||
|
||||
$this->processor->afterSave($entity, $params);
|
||||
}
|
||||
|
||||
@@ -99,9 +99,9 @@ class HookProcessor
|
||||
|
||||
$params = AssignmentNotificatorParams::create()->withRawOptions($options);
|
||||
|
||||
$saveContext = $options[SaveContext::NAME] ?? null;
|
||||
$saveContext = SaveContext::obtainFromRawOptions($options);
|
||||
|
||||
if ($saveContext instanceof SaveContext) {
|
||||
if ($saveContext) {
|
||||
$params = $params->withActionId($saveContext->getId());
|
||||
}
|
||||
|
||||
|
||||
@@ -692,9 +692,9 @@ class Service
|
||||
$noteOptions[SaveOption::CREATED_BY_ID] = $options[SaveOption::CREATED_BY_ID];
|
||||
}
|
||||
|
||||
$saveContext = $options[SaveContext::NAME] ?? null;
|
||||
$saveContext = SaveContext::obtainFromRawOptions($options);
|
||||
|
||||
if ($saveContext instanceof SaveContext) {
|
||||
if ($saveContext) {
|
||||
$noteOptions[SaveContext::NAME] = new SaveContext($saveContext->getId());
|
||||
}
|
||||
|
||||
@@ -761,9 +761,9 @@ class Service
|
||||
$noteOptions[SaveOption::CREATED_BY_ID] = $options[SaveOption::CREATED_BY_ID];
|
||||
}
|
||||
|
||||
$saveContext = $options[SaveContext::NAME] ?? null;
|
||||
$saveContext = SaveContext::obtainFromRawOptions($options);
|
||||
|
||||
if ($saveContext instanceof SaveContext) {
|
||||
if ($saveContext) {
|
||||
$noteOptions[SaveContext::NAME] = new SaveContext($saveContext->getId());
|
||||
}
|
||||
|
||||
@@ -795,9 +795,9 @@ class Service
|
||||
$noteOptions[SaveOption::CREATED_BY_ID] = $options[SaveOption::CREATED_BY_ID];
|
||||
}
|
||||
|
||||
$saveContext = $options[SaveContext::NAME] ?? null;
|
||||
$saveContext = SaveContext::obtainFromRawOptions($options);
|
||||
|
||||
if ($saveContext instanceof SaveContext) {
|
||||
if ($saveContext) {
|
||||
$noteOptions[SaveContext::NAME] = new SaveContext($saveContext->getId());
|
||||
}
|
||||
|
||||
@@ -829,9 +829,9 @@ class Service
|
||||
$noteOptions[SaveOption::CREATED_BY_ID] = $options[SaveOption::MODIFIED_BY_ID];
|
||||
}
|
||||
|
||||
$saveContext = $options[SaveContext::NAME] ?? null;
|
||||
$saveContext = SaveContext::obtainFromRawOptions($options);
|
||||
|
||||
if ($saveContext instanceof SaveContext) {
|
||||
if ($saveContext) {
|
||||
$noteOptions[SaveContext::NAME] = new SaveContext($saveContext->getId());
|
||||
}
|
||||
|
||||
@@ -867,9 +867,9 @@ class Service
|
||||
$noteOptions[SaveOption::CREATED_BY_ID] = $options[SaveOption::MODIFIED_BY_ID];
|
||||
}
|
||||
|
||||
$saveContext = $options[SaveContext::NAME] ?? null;
|
||||
$saveContext = SaveContext::obtainFromRawOptions($options);
|
||||
|
||||
if ($saveContext instanceof SaveContext) {
|
||||
if ($saveContext) {
|
||||
$noteOptions[SaveContext::NAME] = new SaveContext($saveContext->getId());
|
||||
}
|
||||
|
||||
@@ -912,9 +912,9 @@ class Service
|
||||
$noteOptions[SaveOption::CREATED_BY_ID] = $options[SaveOption::MODIFIED_BY_ID];
|
||||
}
|
||||
|
||||
$saveContext = $options[SaveContext::NAME] ?? null;
|
||||
$saveContext = SaveContext::obtainFromRawOptions($options);
|
||||
|
||||
if ($saveContext instanceof SaveContext) {
|
||||
if ($saveContext) {
|
||||
$noteOptions[SaveContext::NAME] = new SaveContext($saveContext->getId());
|
||||
}
|
||||
|
||||
@@ -1071,9 +1071,9 @@ class Service
|
||||
$noteOptions['createdById'] = $options['modifiedById'];
|
||||
}
|
||||
|
||||
$saveContext = $options[SaveContext::NAME] ?? null;
|
||||
$saveContext = SaveContext::obtainFromRawOptions($options);
|
||||
|
||||
if ($saveContext instanceof SaveContext) {
|
||||
if ($saveContext) {
|
||||
$noteOptions[SaveContext::NAME] = new SaveContext($saveContext->getId());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user