| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 29 | public function getHierarchyByMetadataSubject(MetadataSubjectInterface $product) |
||
| 30 | { |
||
| 31 | $hierarchy = [ |
||
| 32 | $product->getMetadataIdentifier(), |
||
| 33 | ]; |
||
| 34 | |||
| 35 | /** @var ArchetypeInterface $productArchetype */ |
||
| 36 | $productArchetype = $product->getArchetype(); |
||
| 37 | if (null !== $productArchetype) { |
||
| 38 | $hierarchy[] = $productArchetype->getMetadataIdentifier(); |
||
| 39 | } |
||
| 40 | |||
| 41 | $hierarchy[] = $product->getMetadataClassIdentifier(); |
||
| 42 | $hierarchy[] = 'DefaultPage'; |
||
| 43 | |||
| 44 | return $hierarchy; |
||
| 45 | } |
||
| 46 | |||
| 55 |