Commit 47ea5faf authored by Fran Garcia-Linares's avatar Fran Garcia-Linares Committed by Tim Plunkett
Browse files

Issue #3283826 by fjgarlin, bnjmnm: is_compatible flag should be present at...

Issue #3283826 by fjgarlin, bnjmnm: is_compatible flag should be present at project level and shown in the frontend
parent 673529bd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ class RandomDataPlugin extends ProjectBrowserSourceBase implements ContainerFact
        'field_module_categories' => [$categories[$category]],
        'field_security_advisory_coverage' => $security_values[$security]['id'],
        'field_project_machine_name' => $machine_name,
        'is_compatible' => (bool) ($i % 4),
        'project_usage' => [],
        'project_usage_total' => rand(0, 100000),
        'flag_project_star_user_count' => rand(0, 100),
+4 −0
Original line number Diff line number Diff line
@@ -373,6 +373,10 @@ class MockDrupalDotOrg extends ProjectBrowserSourceBase implements ContainerFact
          ];
        }

        // Mock projects are filtered and made sure that they are compatible
        // before we even put them in the database.
        $project['is_compatible'] = TRUE;

        // Compute total project usage.
        if (!empty($project['project_usage'])) {
          $project_usage_total = 0;
+8 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ class Project implements ProjectInterface {
      $this->setIsActive($project['is_active']);
      $this->setIsCovered($project['is_covered']);
      $this->setIsMaintained($project['is_maintained']);
      $this->setIsCompatible($project['is_compatible']);
    }
  }

@@ -204,4 +205,11 @@ class Project implements ProjectInterface {
    $this->is_maintained = $is_maintained;
  }

  /**
   * {@inheritdoc}
   */
  public function setIsCompatible(bool $compatible) {
    $this->is_compatible = $compatible;
  }

}
+8 −0
Original line number Diff line number Diff line
@@ -121,4 +121,12 @@ interface ProjectInterface {
   */
  public function setIsMaintained(bool $is_maintained);

  /**
   * Set whether the project is compatible with the current Drupal installation.
   *
   * @param bool $compatible
   *   Whether the project is compatible or not.
   */
  public function setIsCompatible(bool $compatible);

}
+0 −0

File changed.

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

Loading