Loading modules/entity_share_client/src/Form/PullForm.php +6 −6 Original line number Diff line number Diff line Loading @@ -427,28 +427,28 @@ class PullForm extends FormBase { '#type' => 'actions', '#weight' => -10, ]; if (isset($json['links']['first'])) { if (isset($json['links']['first']['href'])) { $form['channel_wrapper']['entities_wrapper']['pager']['first'] = [ '#type' => 'submit', '#value' => $this->t('First'), '#submit' => ['::firstPage'], ]; } if (isset($json['links']['prev'])) { if (isset($json['links']['prev']['href'])) { $form['channel_wrapper']['entities_wrapper']['pager']['prev'] = [ '#type' => 'submit', '#value' => $this->t('Previous'), '#submit' => ['::prevPage'], ]; } if (isset($json['links']['next'])) { if (isset($json['links']['next']['href'])) { $form['channel_wrapper']['entities_wrapper']['pager']['next'] = [ '#type' => 'submit', '#value' => $this->t('Next'), '#submit' => ['::nextPage'], ]; } if (isset($json['links']['last'])) { if (isset($json['links']['last']['href'])) { $form['channel_wrapper']['entities_wrapper']['pager']['last'] = [ '#type' => 'submit', '#value' => $this->t('Last'), Loading Loading @@ -555,11 +555,11 @@ class PullForm extends FormBase { */ protected function pagerRedirect(FormStateInterface $form_state, $link_name) { $storage = $form_state->getStorage(); if (isset($storage['links'][$link_name])) { if (isset($storage['links'][$link_name]['href'])) { $selected_remote = $form_state->getValue('remote'); $selected_channel = $form_state->getValue('channel'); $parsed_url = UrlHelper::parse($storage['links'][$link_name]); $parsed_url = UrlHelper::parse($storage['links'][$link_name]['href']); if (isset($parsed_url['query']['page']) && isset($parsed_url['query']['page']['offset'])) { $form_state->setRedirect('entity_share_client.admin_content_pull_form', [], [ 'query' => [ Loading modules/entity_share_client/src/Service/EntityShareClientCliService.php +4 −4 Original line number Diff line number Diff line Loading @@ -124,8 +124,8 @@ class EntityShareClientCliService { $io->text($t('@number entities have been imported.', ['@number' => count($imported_entities)])); if (isset($json['links']['next'])) { $channel_url = $json['links']['next']; if (isset($json['links']['next']['href'])) { $channel_url = $json['links']['next']['href']; } else { $channel_url = FALSE; Loading Loading @@ -230,8 +230,8 @@ class EntityShareClientCliService { $update_count += count($imported_entities); } if (isset($revisions_json['links']['next'])) { $channel_url = $revisions_json['links']['next']; if (isset($revisions_json['links']['next']['href'])) { $channel_url = $revisions_json['links']['next']['href']; } else { $channel_url = FALSE; Loading modules/entity_share_client/src/Service/JsonapiHelper.php +2 −2 Original line number Diff line number Diff line Loading @@ -231,8 +231,8 @@ class JsonapiHelper implements JsonapiHelperInterface { $field_values = []; // Check that the field has data. if ($field_data['data'] != NULL && isset($field_data['links']) && isset($field_data['links']['related'])) { $referenced_entities_response = $this->getHttpClient()->get($field_data['links']['related']) if ($field_data['data'] != NULL && isset($field_data['links']['related']['href'])) { $referenced_entities_response = $this->getHttpClient()->get($field_data['links']['related']['href']) ->getBody() ->getContents(); $referenced_entities_json = Json::decode($referenced_entities_response); Loading modules/entity_share_client/tests/modules/entity_share_client_test/entity_share_client_test.module +2 −2 Original line number Diff line number Diff line Loading @@ -58,8 +58,8 @@ function entity_share_client_test_cron() { ]); } if (isset($json['links']['next'])) { $url_uuid = $json['links']['next']; if (isset($json['links']['next']['href'])) { $url_uuid = $json['links']['next']['href']; } else { $url_uuid = FALSE; Loading Loading
modules/entity_share_client/src/Form/PullForm.php +6 −6 Original line number Diff line number Diff line Loading @@ -427,28 +427,28 @@ class PullForm extends FormBase { '#type' => 'actions', '#weight' => -10, ]; if (isset($json['links']['first'])) { if (isset($json['links']['first']['href'])) { $form['channel_wrapper']['entities_wrapper']['pager']['first'] = [ '#type' => 'submit', '#value' => $this->t('First'), '#submit' => ['::firstPage'], ]; } if (isset($json['links']['prev'])) { if (isset($json['links']['prev']['href'])) { $form['channel_wrapper']['entities_wrapper']['pager']['prev'] = [ '#type' => 'submit', '#value' => $this->t('Previous'), '#submit' => ['::prevPage'], ]; } if (isset($json['links']['next'])) { if (isset($json['links']['next']['href'])) { $form['channel_wrapper']['entities_wrapper']['pager']['next'] = [ '#type' => 'submit', '#value' => $this->t('Next'), '#submit' => ['::nextPage'], ]; } if (isset($json['links']['last'])) { if (isset($json['links']['last']['href'])) { $form['channel_wrapper']['entities_wrapper']['pager']['last'] = [ '#type' => 'submit', '#value' => $this->t('Last'), Loading Loading @@ -555,11 +555,11 @@ class PullForm extends FormBase { */ protected function pagerRedirect(FormStateInterface $form_state, $link_name) { $storage = $form_state->getStorage(); if (isset($storage['links'][$link_name])) { if (isset($storage['links'][$link_name]['href'])) { $selected_remote = $form_state->getValue('remote'); $selected_channel = $form_state->getValue('channel'); $parsed_url = UrlHelper::parse($storage['links'][$link_name]); $parsed_url = UrlHelper::parse($storage['links'][$link_name]['href']); if (isset($parsed_url['query']['page']) && isset($parsed_url['query']['page']['offset'])) { $form_state->setRedirect('entity_share_client.admin_content_pull_form', [], [ 'query' => [ Loading
modules/entity_share_client/src/Service/EntityShareClientCliService.php +4 −4 Original line number Diff line number Diff line Loading @@ -124,8 +124,8 @@ class EntityShareClientCliService { $io->text($t('@number entities have been imported.', ['@number' => count($imported_entities)])); if (isset($json['links']['next'])) { $channel_url = $json['links']['next']; if (isset($json['links']['next']['href'])) { $channel_url = $json['links']['next']['href']; } else { $channel_url = FALSE; Loading Loading @@ -230,8 +230,8 @@ class EntityShareClientCliService { $update_count += count($imported_entities); } if (isset($revisions_json['links']['next'])) { $channel_url = $revisions_json['links']['next']; if (isset($revisions_json['links']['next']['href'])) { $channel_url = $revisions_json['links']['next']['href']; } else { $channel_url = FALSE; Loading
modules/entity_share_client/src/Service/JsonapiHelper.php +2 −2 Original line number Diff line number Diff line Loading @@ -231,8 +231,8 @@ class JsonapiHelper implements JsonapiHelperInterface { $field_values = []; // Check that the field has data. if ($field_data['data'] != NULL && isset($field_data['links']) && isset($field_data['links']['related'])) { $referenced_entities_response = $this->getHttpClient()->get($field_data['links']['related']) if ($field_data['data'] != NULL && isset($field_data['links']['related']['href'])) { $referenced_entities_response = $this->getHttpClient()->get($field_data['links']['related']['href']) ->getBody() ->getContents(); $referenced_entities_json = Json::decode($referenced_entities_response); Loading
modules/entity_share_client/tests/modules/entity_share_client_test/entity_share_client_test.module +2 −2 Original line number Diff line number Diff line Loading @@ -58,8 +58,8 @@ function entity_share_client_test_cron() { ]); } if (isset($json['links']['next'])) { $url_uuid = $json['links']['next']; if (isset($json['links']['next']['href'])) { $url_uuid = $json['links']['next']['href']; } else { $url_uuid = FALSE; Loading