Commit a7d6f3bf authored by Mathilde Dumond's avatar Mathilde Dumond Committed by Sascha Grossenbacher
Browse files

Issue #3315895 by mathilde_dumond: Use the new gathercontent package

parent 44c32692
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
  "description": "GatherContent for Drupal",
  "license": "GPL-2.0+",
  "require": {
    "cheppers/gathercontent-client": "^2.0",
    "gathercontent/client": "^1.0",
    "drupal/core": "^8.7 || ^9",
    "drupal/migrate_tools": "^4 || ^5"
  },
+1 −1
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ function drush_gathercontent_import($mapping_id = NULL, $status_id = '', $parent

  /** @var \Drupal\gathercontent\DrupalGatherContentClient $client */
  $client = \Drupal::service('gathercontent.client');
  /** @var \Cheppers\GatherContent\DataTypes\Item[] $items */
  /** @var \GatherContent\DataTypes\Item[] $items */
  $items = $client->itemsGet($project_id);

  $publish = drush_get_option('publish', \Drupal::config('gathercontent.import')->get('node_default_status'));
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

namespace Drupal\gathercontent_ui\Controller;

use Cheppers\GatherContent\GatherContentClientInterface;
use GatherContent\GatherContentClientInterface;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\DependencyInjection\ContainerInterface;

+4 −4
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

namespace Drupal\gathercontent_ui\Form;

use Cheppers\GatherContent\GatherContentClientInterface;
use GatherContent\GatherContentClientInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
@@ -67,7 +67,7 @@ class ContentImportSelectForm extends FormBase {
  /**
   * GatherCotnent client.
   *
   * @var \Cheppers\GatherContent\GatherContentClientInterface
   * @var \GatherContent\GatherContentClientInterface
   */
  protected $client;

@@ -418,7 +418,7 @@ class ContentImportSelectForm extends FormBase {
      ];

      $options = [];
      /** @var \Cheppers\GatherContent\DataTypes\Status[] $statuses */
      /** @var \GatherContent\DataTypes\Status[] $statuses */
      $statuses = $this->client->projectStatusesGet($this->projectId);

      foreach ($statuses['data'] as $status) {
@@ -493,7 +493,7 @@ class ContentImportSelectForm extends FormBase {
        $importOptions = [];

        foreach ($importContent as $value) {
          /** @var \Cheppers\GatherContent\DataTypes\Item $item */
          /** @var \GatherContent\DataTypes\Item $item */
          $gcItem = $this->client->itemGet($value);
          /** @var \Drupal\gathercontent\Entity\MappingInterface $mapping */
          $mapping = MappingLoader::load($gcItem);
+2 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

namespace Drupal\gathercontent_ui\Form;

use Cheppers\GatherContent\GatherContentClientInterface;
use GatherContent\GatherContentClientInterface;
use Drupal\Core\Entity\EntityFieldManagerInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Language\LanguageInterface;
@@ -54,7 +54,7 @@ class MappingEditForm extends MappingEditFormBase {
   *
   * @param \Drupal\Core\Entity\EntityFieldManagerInterface $entityFieldManager
   *   EntityFieldManagerInterface.
   * @param \Cheppers\GatherContent\GatherContentClientInterface $client
   * @param \GatherContent\GatherContentClientInterface $client
   *   GatherContent client.
   * @param \Drupal\gathercontent_ui\Form\MappingEditSteps\MappingStepService $mapping_service
   *   MappingStepService.
Loading