| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function getThumbnail(ContentType $contentType, array $fields): ?string |
||
| 18 | { |
||
| 19 | foreach ($this->strategies as $priority => $strategies) { |
||
| 20 | $strategies = (array)$strategies; |
||
| 21 | |||
| 22 | /** @var \eZ\Publish\SPI\Repository\Strategy\ContentThumbnail\ThumbnailStrategy $strategy */ |
||
| 23 | foreach ($strategies as $strategy) { |
||
| 24 | $thumbnail = $strategy->getThumbnail($contentType, $fields); |
||
| 25 | |||
| 26 | if ($thumbnail !== null) { |
||
| 27 | return $thumbnail; |
||
| 28 | } |
||
| 29 | } |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 48 | } |