Skip to content

Commit

Permalink
[#34] Send Dataset parameters with getfields API call
Browse files Browse the repository at this point in the history
  • Loading branch information
jensschuppe committed Feb 22, 2021
1 parent 489a529 commit ddd721d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmrf_views/src/CMRFViews.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,19 @@ public function getFields($dataset) {

if ((!empty($dataset['connector'])) && (!empty($dataset['entity'])) && (!empty($dataset['action']))) {

// Set the parameters from the dataset params options.
if (!empty($dataset['params'])) {
foreach ($dataset['params'] as $key => $value) {
$dataset['params'][$key] = \Drupal::token()->replace($value);
}
}

// API Call to retrieve the fields.
$call = $this->core->createCall(
$dataset['connector'],
$dataset['entity'],
$dataset['getfields'],
['api_action' => $dataset['action']],
['api_action' => $dataset['action']] + $dataset['params'],
['limit' => 0]
);
$this->core->executeCall($call);
Expand Down

0 comments on commit ddd721d

Please sign in to comment.