comparison vendor/consolidation/output-formatters/src/StructuredData/RenderCellCollectionTrait.php @ 13:5fb285c0d0e3

Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've been lucky to get away with this so far, as we don't support self-registration which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5 was vulnerable to.
author Chris Cannam
date Mon, 23 Apr 2018 09:33:26 +0100
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
12:7a779792577d 13:5fb285c0d0e3
1 <?php 1 <?php
2 namespace Consolidation\OutputFormatters\StructuredData; 2 namespace Consolidation\OutputFormatters\StructuredData;
3 3
4 use Consolidation\OutputFormatters\Options\FormatterOptions; 4 use Consolidation\OutputFormatters\Options\FormatterOptions;
5 use Consolidation\OutputFormatters\Formatters\FormatterAwareInterface;
6 use Consolidation\OutputFormatters\Formatters\FormatterAwareTrait;
5 7
6 trait RenderCellCollectionTrait 8 trait RenderCellCollectionTrait
7 { 9 {
10 use FormatterAwareTrait;
8 11
9 /** @var RenderCellInterface[] */ 12 /** @var RenderCellInterface[] */
10 protected $rendererList = [ 13 protected $rendererList = [
11 RenderCellCollectionInterface::PRIORITY_FIRST => [], 14 RenderCellCollectionInterface::PRIORITY_FIRST => [],
12 RenderCellCollectionInterface::PRIORITY_NORMAL => [], 15 RenderCellCollectionInterface::PRIORITY_NORMAL => [],
47 }, 50 },
48 [] 51 []
49 ); 52 );
50 53
51 foreach ($flattenedRendererList as $renderer) { 54 foreach ($flattenedRendererList as $renderer) {
55 if ($renderer instanceof FormatterAwareInterface) {
56 $renderer->setFormatter($this->getFormatter());
57 }
52 $cellData = $renderer->renderCell($key, $cellData, $options, $rowData); 58 $cellData = $renderer->renderCell($key, $cellData, $options, $rowData);
53 if (is_string($cellData)) {
54 return $cellData;
55 }
56 } 59 }
57 return $cellData; 60 return $cellData;
58 } 61 }
59 } 62 }