|
| | __clone () |
| | Implement PHP __clone to create a deep clone, not just a shallow copy.
|
| |
| | applyFromArray (array $styleArray, bool $advancedBorders=true) |
| | Apply styles from array.
|
| |
| | bindParent (Spreadsheet|self $parent, ?string $parentPropertyName=null) |
| | Bind parent.
|
| |
| | exportArray () |
| | Export style as array.
|
| |
| | getActiveCell () |
| | Get the currently active cell coordinate in currently active sheet.
|
| |
| | getActiveSheet () |
| | Get the currently active sheet.
|
| |
|
| getAlignment () |
| | Get Alignment.
|
| |
|
| getBorders () |
| | Get Borders.
|
| |
| | getConditionalStyles () |
| | Get Conditional Styles.
|
| |
|
| getFill () |
| | Get Fill.
|
| |
|
| getFont () |
| | Get Font.
|
| |
| | getHashCode () |
| | Get hash code.
|
| |
|
| getIndex () |
| | Get own index in style collection.
|
| |
|
| getIsSupervisor () |
| | Is this a supervisor or a cell style component?
|
| |
|
| getNumberFormat () |
| | Get Number Format.
|
| |
| | getParent () |
| | Get parent.
|
| |
|
| getProtection () |
| | Get Protection.
|
| |
|
| getQuotePrefix () |
| | Get quote prefix.
|
| |
| | getSelectedCells () |
| | Get the currently active cell coordinate in currently active sheet.
|
| |
| if( $isSupervisor) | getSharedComponent () |
| | Get the shared style component for the currently active cell in currently active sheet.
|
| |
| | getStyleArray (array $array) |
| | Build style array from subcomponents.
|
| |
| | setConditionalStyles (array $conditionalStyleArray) |
| | Set Conditional Styles.
|
| |
| | setFont (Font $font) |
| | Set font.
|
| |
|
| setIndex (int $index) |
| | Set own index in style collection.
|
| |
| | setQuotePrefix (bool $quotePrefix) |
| | Set quote prefix.
|
| |
|
|
$this | alignment = new Alignment($isSupervisor, $isConditional) |
| |
|
$this | borders = new Borders($isSupervisor, $isConditional) |
| |
|
$this | fill = new Fill($isSupervisor, $isConditional) |
| |
|
$this | numberFormat = new NumberFormat($isSupervisor, $isConditional) |
| |
|
$this | protection = new Protection($isSupervisor, $isConditional) |
| |
|
| | exportArray1 () |
| | Abstract method to be implemented in anything which extends this class.
|
| |
| | exportArray2 (array &$exportedArray, string $index, mixed $objOrValue) |
| | Populate array from exportArray1.
|
| |
◆ __clone()
| PhpOffice\PhpSpreadsheet\Style\Supervisor::__clone |
( |
| ) |
|
|
inherited |
◆ applyFromArray()
| PhpOffice\PhpSpreadsheet\Style\Style::applyFromArray |
( |
array | $styleArray, |
|
|
bool | $advancedBorders = true ) |
Apply styles from array.
$spreadsheet->getActiveSheet()->getStyle('B2')->applyFromArray( [ 'font' => [ 'name' => 'Arial', 'bold' => true, 'italic' => false, 'underline' => Font::UNDERLINE_DOUBLE, 'strikethrough' => false, 'color' => [ 'rgb' => '808080' ] ], 'borders' => [ 'bottom' => [ 'borderStyle' => Border::BORDER_DASHDOT, 'color' => [ 'rgb' => '808080' ] ], 'top' => [ 'borderStyle' => Border::BORDER_DASHDOT, 'color' => [ 'rgb' => '808080' ] ] ], 'alignment' => [ 'horizontal' => Alignment::HORIZONTAL_CENTER, 'vertical' => Alignment::VERTICAL_CENTER, 'wrapText' => true, ], 'quotePrefix' => true ] );
- Parameters
-
| array | $styleArray | Array containing style information |
| bool | $advancedBorders | advanced mode for setting borders |
- Return values
-
◆ bindParent()
| PhpOffice\PhpSpreadsheet\Style\Supervisor::bindParent |
( |
Spreadsheet|self | $parent, |
|
|
?string | $parentPropertyName = null ) |
|
inherited |
Bind parent.
Only used for supervisor.
- Return values
-
◆ exportArray()
| PhpOffice\PhpSpreadsheet\Style\Supervisor::exportArray |
( |
| ) |
|
|
finalinherited |
Export style as array.
Available to anything which extends this class: Alignment, Border, Borders, Color, Fill, Font, NumberFormat, Protection, and Style.
◆ exportArray1()
| PhpOffice\PhpSpreadsheet\Style\Style::exportArray1 |
( |
| ) |
|
|
protected |
Abstract method to be implemented in anything which extends this class.
This method invokes exportArray2 with the names and values of all properties to be included in output array, returning that array to exportArray, then to caller.
Reimplemented from PhpOffice\PhpSpreadsheet\Style\Supervisor.
◆ exportArray2()
| PhpOffice\PhpSpreadsheet\Style\Supervisor::exportArray2 |
( |
array & | $exportedArray, |
|
|
string | $index, |
|
|
mixed | $objOrValue ) |
|
finalprotectedinherited |
Populate array from exportArray1.
This method is available to anything which extends this class. The parameter index is the key to be added to the array. The parameter objOrValue is either a primitive type, which is the value added to the array, or a Style object to be recursively added via exportArray.
◆ getActiveCell()
| PhpOffice\PhpSpreadsheet\Style\Supervisor::getActiveCell |
( |
| ) |
|
|
inherited |
Get the currently active cell coordinate in currently active sheet.
Only used for supervisor.
- Return values
-
◆ getActiveSheet()
| PhpOffice\PhpSpreadsheet\Style\Supervisor::getActiveSheet |
( |
| ) |
|
|
inherited |
Get the currently active sheet.
Only used for supervisor.
◆ getConditionalStyles()
| PhpOffice\PhpSpreadsheet\Style\Style::getConditionalStyles |
( |
| ) |
|
Get Conditional Styles.
Only used on supervisor.
- Return values
-
◆ getHashCode()
| PhpOffice\PhpSpreadsheet\Style\Style::getHashCode |
( |
| ) |
|
◆ getParent()
| PhpOffice\PhpSpreadsheet\Style\Style::getParent |
( |
| ) |
|
Get parent.
Only used for style supervisor.
◆ getSelectedCells()
| PhpOffice\PhpSpreadsheet\Style\Supervisor::getSelectedCells |
( |
| ) |
|
|
inherited |
Get the currently active cell coordinate in currently active sheet.
Only used for supervisor.
- Return values
-
◆ getSharedComponent()
| if($isSupervisor) PhpOffice\PhpSpreadsheet\Style\Style::getSharedComponent |
( |
| ) |
|
◆ getStyleArray()
| PhpOffice\PhpSpreadsheet\Style\Style::getStyleArray |
( |
array | $array | ) |
|
◆ setConditionalStyles()
| PhpOffice\PhpSpreadsheet\Style\Style::setConditionalStyles |
( |
array | $conditionalStyleArray | ) |
|
Set Conditional Styles.
Only used on supervisor.
- Parameters
-
| Conditional[] | $conditionalStyleArray | Array of conditional styles |
- Return values
-
◆ setFont()
| PhpOffice\PhpSpreadsheet\Style\Style::setFont |
( |
Font | $font | ) |
|
◆ setQuotePrefix()
| PhpOffice\PhpSpreadsheet\Style\Style::setQuotePrefix |
( |
bool | $quotePrefix | ) |
|
Set quote prefix.
- Return values
-
◆ $index
| int PhpOffice\PhpSpreadsheet\Style\Style::$index |
|
protected |
Index of style in collection.
Only used for real style.
◆ $parent
| Spreadsheet Supervisor PhpOffice\PhpSpreadsheet\Style\Supervisor::$parent |
|
protectedinherited |
Parent.
Only used for supervisor.
◆ $quotePrefix
| bool PhpOffice\PhpSpreadsheet\Style\Style::$quotePrefix = false |
|
protected |
Use Quote Prefix when displaying in cell editor.
Only used for real style.
The documentation for this class was generated from the following file:
- lib/phpspreadsheet/phpspreadsheet/src/PhpSpreadsheet/Style/Style.php