Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I want to manipulate data of feeds by hook_feeds_presave.
They are given like this:
FeedsSource Object
(
...
[fetcher_result:protected] => FeedsWSClientFetcherResult Object
(
[data:protected] => stdClass Object
(
[GetMatchdataByGroupLeagueSaisonResult] => stdClass Object
(
[Matchdata] => Array
(
[0] => stdClass Object
(
[matchID] => 23725
So I tried it like this:
$source->fetcher_result['data']['GetMatchdataByGroupLeagueSaisonResult']['Matchdata']['0']['nameTeam1']
But that's wrong.
So how can I get this data from result I want to manipulate???
THX in advance,
maen
Comments
Comment #1
gaurav.goyal CreditAttribution: gaurav.goyal commentedfeeds_hook_presave has a argument $entity, which holds the data for the entity which is imported, you can change the values in $entity.