Skip to content

Commit

Permalink
Add getReferences() method to include product_id (#2086)
Browse files Browse the repository at this point in the history
* Add getReferences() method to include product_id

In certain cases, an upstream ID and product_id won't be the same, and this leads to failures when trying to list sites by upstream ID.

* Fix phpcs issue

Co-authored-by: Sara McCutcheon <[email protected]>
  • Loading branch information
twfahey1 and TeslaDethray authored Sep 1, 2020
1 parent 93ae546 commit 28995f0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Models/SiteUpstream.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,12 @@ protected function parseAttributes($data)
}
return $data;
}

/**
* @return string[]
*/
public function getReferences()
{
return [$this->id, $this->get('product_id'), $this->get('label'), $this->get('machine_name'),];
}
}

0 comments on commit 28995f0

Please sign in to comment.