Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Modification of Feed Attributes in EVENT_BEFORE_PROCESS_FEED #1582

Open
wants to merge 3 commits into
base: 6.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/services/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ public function beforeProcessFeed(FeedModel $feed, array $feedData)

// Fire an 'onBeforeProcessFeed' event
$event = new FeedProcessEvent([
'feed' => $feed,
'feed' => $return,
'feedData' => $this->_data,
'element' => $feed->element,
]);

$this->trigger(self::EVENT_BEFORE_PROCESS_FEED, $event);
Expand All @@ -156,7 +157,8 @@ public function beforeProcessFeed(FeedModel $feed, array $feedData)
return;
}

// Allow event to modify the feed data
// Allow event to modify the feed & feed data
$return = $event->feed;
$this->_data = $event->feedData;

// Return the feed data
Expand Down
Loading