MetadataSpreadsheetTrait
Description of MetadataSpreadsheetTrait
Tags
Table of Contents
Properties
- $horizontal : bool
- $valueMaps : array<string, array<string, NamedNode>>
- Stores value maps for cells with list-controlled values.
Methods
- getPropertyLang() : array<string|int, string>
- getValue() : NamedNode|Literal|null
- mapReferenceCells() : void
- mapReferenceCols() : void
- mapReferenceRows() : void
Properties
$horizontal
private
bool
$horizontal
$valueMaps
Stores value maps for cells with list-controlled values.
private
array<string, array<string, NamedNode>>
$valueMaps
Needs to be recomputed with mapReferenceCols() every time you change the sheet.
Methods
getPropertyLang()
private
getPropertyLang(string $value, string $defaultLang) : array<string|int, string>
Parameters
- $value : string
- $defaultLang : string
Return values
array<string|int, string>getValue()
private
getValue(Cell $cell, PropertyDesc $propDesc, string|null $defaultLang) : NamedNode|Literal|null
Parameters
- $cell : Cell
- $propDesc : PropertyDesc
- $defaultLang : string|null
Return values
NamedNode|Literal|nullmapReferenceCells()
private
mapReferenceCells(Spreadsheet $worksheet, DataValidation $validation, string $mapName) : void
Parameters
- $worksheet : Spreadsheet
- $validation : DataValidation
- $mapName : string
mapReferenceCols()
private
mapReferenceCols(WorksheetConfig $cfg) : void
Parameters
- $cfg : WorksheetConfig
mapReferenceRows()
private
mapReferenceRows(Worksheet $sheet, array<string, PropertyMapping> $propertyMap, string $valueColumn) : void
Parameters
- $sheet : Worksheet
- $propertyMap : array<string, PropertyMapping>
- $valueColumn : string