AbstractStructuredList
abstract class AbstractStructuredList extends AbstractListData implements RestructureInterface, RenderCellCollectionInterface (View source)
Holds an array where each element of the array is one row, and each row contains an associative array where the keys are the field names, and the values are the field data.
It is presumed that every row contains the same keys.
Traits
Properties
protected | $formatter | from FormatterAwareTrait | |
protected RenderCellInterface[] | $rendererList | from RenderCellCollectionTrait |
Methods
No description
A structured list may provide its own set of default options. These will be used in place of the command's default options (from the annotations) in instances where the user does not provide the options explicitly (on the commandline) or implicitly (via a configuration file).
Add a renderer
Add a callable as a renderer
Allow structured data to be restructured -- i.e. to select fields to show, reorder fields, etc.
No description
No description
Details
__construct($data)
No description
array
getListData(FormatterOptions $options)
Convert data to a format suitable for use in a list.
By default, the array values will be used. Implement ListDataInterface to use some other criteria (e.g. array keys).
protected
getReorderedFieldLabels($data, $options, $defaults)
No description
protected
getFields($options, $defaults)
No description
protected array
defaultOptions()
A structured list may provide its own set of default options. These will be used in place of the command's default options (from the annotations) in instances where the user does not provide the options explicitly (on the commandline) or implicitly (via a configuration file).
setFormatter(FormatterInterface $formatter)
No description
getFormatter()
No description
isHumanReadable()
No description
$this
addRenderer(RenderCellInterface $renderer, $priority = RenderCellCollectionInterface::PRIORITY_NORMAL)
Add a renderer
$this
addRendererFunction(callable $rendererFn, $priority = RenderCellCollectionInterface::PRIORITY_NORMAL)
Add a callable as a renderer
renderCell($key, $cellData, FormatterOptions $options, $rowData)
{@inheritdoc}
abstract
restructure(FormatterOptions $options)
Allow structured data to be restructured -- i.e. to select fields to show, reorder fields, etc.
protected
createTableTransformation($data, $options)
No description
protected
instantiateTableTransformation($data, $fieldLabels, $rowLabels)
No description