X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fconsolidation%2Foutput-formatters%2Fsrc%2FStructuredData%2FRenderCellCollectionTrait.php;fp=vendor%2Fconsolidation%2Foutput-formatters%2Fsrc%2FStructuredData%2FRenderCellCollectionTrait.php;h=f4f508b7b2b808bdbfa7b718d79ff0107dfc1e3f;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=c4f23c7d38309495a16e827cba274111c2ce3722;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/consolidation/output-formatters/src/StructuredData/RenderCellCollectionTrait.php b/vendor/consolidation/output-formatters/src/StructuredData/RenderCellCollectionTrait.php index c4f23c7d3..f4f508b7b 100644 --- a/vendor/consolidation/output-formatters/src/StructuredData/RenderCellCollectionTrait.php +++ b/vendor/consolidation/output-formatters/src/StructuredData/RenderCellCollectionTrait.php @@ -2,9 +2,12 @@ namespace Consolidation\OutputFormatters\StructuredData; use Consolidation\OutputFormatters\Options\FormatterOptions; +use Consolidation\OutputFormatters\Formatters\FormatterAwareInterface; +use Consolidation\OutputFormatters\Formatters\FormatterAwareTrait; trait RenderCellCollectionTrait { + use FormatterAwareTrait; /** @var RenderCellInterface[] */ protected $rendererList = [ @@ -49,10 +52,10 @@ trait RenderCellCollectionTrait ); foreach ($flattenedRendererList as $renderer) { - $cellData = $renderer->renderCell($key, $cellData, $options, $rowData); - if (is_string($cellData)) { - return $cellData; + if ($renderer instanceof FormatterAwareInterface) { + $renderer->setFormatter($this->getFormatter()); } + $cellData = $renderer->renderCell($key, $cellData, $options, $rowData); } return $cellData; }