Commit 9b872d88 authored by Srishti Bankar's avatar Srishti Bankar Committed by Chris Wells
Browse files

Issue #3279676 by srishtiiee, chrisfromredfin, fjgarlin: Remove references to...

Issue #3279676 by srishtiiee, chrisfromredfin, fjgarlin: Remove references to taxonomy_vocabulary_3 and the like from Svelte
parent f2c12083
Loading
Loading
Loading
Loading
+8 −14
Original line number Diff line number Diff line
@@ -49,24 +49,18 @@ class DrupalOrgProject {

  /**
   * Module categories.
   *
   * @todo need to change this to field_module_categories.
   */
  public $taxonomy_vocabulary_3;
  public $field_module_categories;

  /**
   * Maintenance status.
   *
   * @todo need to change this to field_maintenance_status.
   */
  public $taxonomy_vocabulary_44;
  public $field_maintenance_status;

  /**
   * Development status.
   *
   * @todo need to change this to field_development_status.
   */
  public $taxonomy_vocabulary_46;
  public $field_development_status;

  /**
   * Non-public properties.
@@ -225,16 +219,16 @@ class DrupalOrgProject {
    }

    // Module categories.
    $this->taxonomy_vocabulary_3 = $project['taxonomy_vocabulary_3'];
    $this->field_module_categories = $project['field_module_categories'];

    // Maintenance status.
    if (array_key_exists('taxonomy_vocabulary_44', $project) && $project['taxonomy_vocabulary_44']) {
      $this->taxonomy_vocabulary_44 = $project['taxonomy_vocabulary_44'];
    if (array_key_exists('field_maintenance_status', $project) && $project['field_maintenance_status']) {
      $this->field_maintenance_status = $project['field_maintenance_status'];
    }

    // Development status.
    if (array_key_exists('taxonomy_vocabulary_46', $project) && $project['taxonomy_vocabulary_46']) {
      $this->taxonomy_vocabulary_46 = $project['taxonomy_vocabulary_46'];
    if (array_key_exists('field_development_status', $project) && $project['field_development_status']) {
      $this->field_development_status = $project['field_development_status'];
    }
  }

+3 −2
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@ class MockDrupalDotOrg extends PluginBase implements ProjectBrowserSourceInterfa
        // @todo Map any properties from the mock to the expected in Project.
        $project['field_maintenance_status'] = $project['taxonomy_vocabulary_44'];
        $project['field_module_categories'] = $project['taxonomy_vocabulary_3'];
        $project['field_development_status'] = $project['taxonomy_vocabulary_46'];
        $returned_list[] = new Project($project);
      }
    }
@@ -177,8 +178,8 @@ class MockDrupalDotOrg extends PluginBase implements ProjectBrowserSourceInterfa
      }

      // Filter by category.
      if (array_key_exists('taxonomy_vocabulary_3', $query)) {
        $tids = explode(',', $query['taxonomy_vocabulary_3']);
      if (array_key_exists('field_module_categories', $query)) {
        $tids = explode(',', $query['field_module_categories']);
        if (count($tids) === 1) {
          $db_query->join('project_browser_categories', 'cat', 'pbp.nid = cat.pid AND cat.tid = :tid', [
            ':tid' => $tids[0],
+2 −4
Original line number Diff line number Diff line
@@ -136,8 +136,7 @@ class Project implements ProjectInterface {
   * {@inheritdoc}
   */
  public function setMaintenanceStatus($maintenance_status) {
    // @todo change to field_maintenance_status. It is consumed as taxonomy_... in svelte.
    $this->taxonomy_vocabulary_44 = $maintenance_status;
    $this->field_maintenance_status = $maintenance_status;
  }

  /**
@@ -151,8 +150,7 @@ class Project implements ProjectInterface {
   * {@inheritdoc}
   */
  public function setModuleCategories($category) {
    // @todo change to field_module_categories. It is consumed as taxonomy_... in svelte.
    $this->taxonomy_vocabulary_3 = $category;
    $this->field_module_categories = $category;
  }

  /**
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

Loading