Skip to content

Commit

Permalink
add labels/colors support back
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Taylor committed Dec 9, 2020
1 parent d515fa7 commit ce7310a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/models/ColourSwatches.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ class ColourSwatches
* @var string
*/

public $label = '';
public $color = '';

public function __construct($value)
{
if($this->validateJson($value)){
Expand Down Expand Up @@ -38,4 +41,19 @@ public function validateJson($value)
return $json && $value != $json;
}

public function __toString()
{
return $this->label;
}

public function colors()
{
return $this->color;
}

public function labels()
{
return $this->label;
}

}

0 comments on commit ce7310a

Please sign in to comment.