|
Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
|
Public Member Functions | |
| __construct (bool $isSupervisor=false, bool $isConditional=false) | |
| Create a new Alignment. | |
| __clone () | |
| Implement PHP __clone to create a deep clone, not just a shallow copy. | |
| applyFromArray (array $styleArray) | |
| 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. | |
| getHashCode () | |
| Get hash code. | |
| getHorizontal () | |
| Get Horizontal. | |
| getIndent () | |
| Get indent. | |
| getIsSupervisor () | |
| Is this a supervisor or a cell style component? | |
| getJustifyLastLine () | |
| Get Justify Last Line. | |
| getReadOrder () | |
| Get read order. | |
| getSelectedCells () | |
| Get the currently active cell coordinate in currently active sheet. | |
| getSharedComponent () | |
| Get the shared style component for the currently active cell in currently active sheet. | |
| getShrinkToFit () | |
| Get Shrink to fit. | |
| getStyleArray (array $array) | |
| Build style array from subcomponents. | |
| getTextRotation () | |
| Get TextRotation. | |
| getVertical () | |
| Get Vertical. | |
| getWrapText () | |
| Get Wrap Text. | |
| setHorizontal (string $horizontalAlignment) | |
| Set Horizontal. | |
| setIndent (int $indent) | |
| Set indent. | |
| setJustifyLastLine (bool $justifyLastLine) | |
| Set Justify Last Line. | |
| setReadOrder (int $readOrder) | |
| Set read order. | |
| setShrinkToFit (bool $shrink) | |
| Set Shrink to fit. | |
| setTextRotation (int $angleInDegrees) | |
| Set TextRotation. | |
| setVertical (string $verticalAlignment) | |
| Set Vertical. | |
| setWrapText (bool $wrapped) | |
| Set Wrap Text. | |
Public Attributes | |
| const | HORIZONTAL_ALIGNMENT_FOR_HTML |
| const | HORIZONTAL_ALIGNMENT_FOR_XLSX |
| const | HORIZONTAL_CENTER = 'center' |
| const | HORIZONTAL_CENTER_CONTINUOUS = 'centerContinuous' |
| const | HORIZONTAL_DISTRIBUTED = 'distributed' |
| const | HORIZONTAL_FILL = 'fill' |
| const | HORIZONTAL_GENERAL = 'general' |
| const | HORIZONTAL_JUSTIFY = 'justify' |
| const | HORIZONTAL_LEFT = 'left' |
| const | HORIZONTAL_RIGHT = 'right' |
| const | READORDER_CONTEXT = 0 |
| const | READORDER_LTR = 1 |
| const | READORDER_RTL = 2 |
| const | TEXTROTATION_STACK_EXCEL = 255 |
| const | TEXTROTATION_STACK_PHPSPREADSHEET = -165 |
| const | VERTICAL_ALIGNMENT_FOR_HTML |
| const | VERTICAL_ALIGNMENT_FOR_XLSX |
| const | VERTICAL_BOTTOM = 'bottom' |
| const | VERTICAL_CENTER = 'center' |
| const | VERTICAL_DISTRIBUTED = 'distributed' |
| const | VERTICAL_JUSTIFY = 'justify' |
| const | VERTICAL_TOP = 'top' |
Protected Member Functions | |
| exportArray1 () | |
| Abstract method to be implemented in anything which extends this class. | |
| exportArray2 (array &$exportedArray, string $index, mixed $objOrValue) | |
| Populate array from exportArray1. | |
Protected Attributes | |
| string | $horizontal = self::HORIZONTAL_GENERAL |
| int | $indent = 0 |
| Indent - only possible with horizontal alignment left and right. | |
| bool | $isSupervisor |
| bool | $justifyLastLine = null |
| Justify Last Line alignment. | |
| Spreadsheet Supervisor | $parent |
| Parent. | |
| string | $parentPropertyName = null |
| Parent property name. | |
| int | $readOrder = 0 |
| Read order. | |
| bool | $shrinkToFit = false |
| Shrink to fit. | |
| int | $textRotation = 0 |
| Text rotation. | |
| string | $vertical = self::VERTICAL_BOTTOM |
| Vertical alignment. | |
| bool | $wrapText = false |
| Wrap text. | |
| PhpOffice\PhpSpreadsheet\Style\Alignment::__construct | ( | bool | $isSupervisor = false, |
| bool | $isConditional = false ) |
Create a new Alignment.
| bool | $isSupervisor | Flag indicating if this is a supervisor or not Leave this value at default unless you understand exactly what its ramifications are |
| bool | $isConditional | Flag indicating if this is a conditional style or not Leave this value at default unless you understand exactly what its ramifications are |
|
inherited |
Implement PHP __clone to create a deep clone, not just a shallow copy.
Reimplemented in PhpOffice\PhpSpreadsheet\Style\Font.
| PhpOffice\PhpSpreadsheet\Style\Alignment::applyFromArray | ( | array | $styleArray | ) |
Apply styles from array.
$spreadsheet->getActiveSheet()->getStyle('B2')->getAlignment()->applyFromArray( [ 'horizontal' => PhpOffice\PhpSpreadsheet\Style\Alignment\HORIZONTAL_CENTER, 'vertical' => PhpOffice\PhpSpreadsheet\Style\Alignment\VERTICAL_CENTER, 'textRotation' => 0, 'wrapText' => TRUE ] );
| array | $styleArray | Array containing style information |
| $this |
|
inherited |
Bind parent.
Only used for supervisor.
| $this |
|
finalinherited |
Export style as array.
Available to anything which extends this class: Alignment, Border, Borders, Color, Fill, Font, NumberFormat, Protection, and Style.
|
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.
|
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.
|
inherited |
Get the currently active cell coordinate in currently active sheet.
Only used for supervisor.
| string | E.g. 'A1' |
|
inherited |
Get the currently active sheet.
Only used for supervisor.
| PhpOffice\PhpSpreadsheet\Style\Alignment::getHashCode | ( | ) |
|
inherited |
Get the currently active cell coordinate in currently active sheet.
Only used for supervisor.
| string | E.g. 'A1' |
| PhpOffice\PhpSpreadsheet\Style\Alignment::getSharedComponent | ( | ) |
Get the shared style component for the currently active cell in currently active sheet.
Only used for style supervisor.
Reimplemented from PhpOffice\PhpSpreadsheet\Style\Supervisor.
| PhpOffice\PhpSpreadsheet\Style\Alignment::getStyleArray | ( | array | $array | ) |
Build style array from subcomponents.
Reimplemented from PhpOffice\PhpSpreadsheet\Style\Supervisor.
| PhpOffice\PhpSpreadsheet\Style\Alignment::setHorizontal | ( | string | $horizontalAlignment | ) |
Set Horizontal.
| string | $horizontalAlignment | see self::HORIZONTAL_* |
| $this |
| PhpOffice\PhpSpreadsheet\Style\Alignment::setIndent | ( | int | $indent | ) |
Set indent.
| $this |
| PhpOffice\PhpSpreadsheet\Style\Alignment::setJustifyLastLine | ( | bool | $justifyLastLine | ) |
Set Justify Last Line.
| $this |
| PhpOffice\PhpSpreadsheet\Style\Alignment::setReadOrder | ( | int | $readOrder | ) |
Set read order.
| $this |
| PhpOffice\PhpSpreadsheet\Style\Alignment::setShrinkToFit | ( | bool | $shrink | ) |
Set Shrink to fit.
| $this |
| PhpOffice\PhpSpreadsheet\Style\Alignment::setTextRotation | ( | int | $angleInDegrees | ) |
Set TextRotation.
| $this |
| PhpOffice\PhpSpreadsheet\Style\Alignment::setVertical | ( | string | $verticalAlignment | ) |
Set Vertical.
| string | $verticalAlignment | see self::VERTICAL_* |
| $this |
| PhpOffice\PhpSpreadsheet\Style\Alignment::setWrapText | ( | bool | $wrapped | ) |
Set Wrap Text.
| $this |
|
protectedinherited |
Parent.
Only used for supervisor.
| const PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_ALIGNMENT_FOR_HTML |
| const PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_ALIGNMENT_FOR_XLSX |
| const PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_ALIGNMENT_FOR_HTML |
| const PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_ALIGNMENT_FOR_XLSX |