public function getHTML(Property $property, Specification $specification) { $value = $specification->getAttribute('value'); $arr = []; foreach ($property->getDefaultValues() as $defaultValue) { if (in_array($defaultValue->getId(), $value)) { $arr[] = $defaultValue->getName(); } } echo implode(', ', $arr); }
public function getHTML(Property $property, Specification $specification) { $out = ''; $value = $specification->getAttribute('value'); foreach ($property->getDefaultValues() as $defaultValue) { if ($defaultValue->getId() == $value) { $out .= $defaultValue->getName(); break; } } echo $out; }