|
Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
|
Public Member Functions | |
| __construct (bool $isSupervisor=false, bool $isConditional=false) | |
| Create a new Font. | |
| __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. | |
| getBaseLine () | |
| getBold () | |
| Get Bold. | |
| getCap () | |
| getChartColor () | |
| getColor () | |
| Get Color. | |
| getComplexScript () | |
| getEastAsian () | |
| getHashCode () | |
| Get hash code. | |
| getIsSupervisor () | |
| Is this a supervisor or a cell style component? | |
| getItalic () | |
| Get Italic. | |
| getLatin () | |
| getName () | |
| Get Name. | |
| getScheme () | |
| 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. | |
| getSize () | |
| Get Size. | |
| getStrikethrough () | |
| Get Strikethrough. | |
| getStrikeType () | |
| getStyleArray (array $array) | |
| Build style array from subcomponents. | |
| getSubscript () | |
| Get Subscript. | |
| getSuperscript () | |
| Get Superscript. | |
| getUnderline () | |
| Get Underline. | |
| getUnderlineColor () | |
| setBaseLine (int $baseLine) | |
| setBold (bool $bold) | |
| Set Bold. | |
| setCap (string $cap) | |
| Set capitalization attribute. | |
| setChartColor (array $colorArray) | |
| setChartColorFromObject (?ChartColor $chartColor) | |
| setColor (Color $color) | |
| Set Color. | |
| setComplexScript (string $fontname) | |
| setEastAsian (string $fontname) | |
| setItalic (bool $italic) | |
| Set Italic. | |
| setLatin (string $fontname) | |
| setName (string $fontname) | |
| Set Name and turn off Scheme. | |
| setScheme (string $scheme) | |
| setSize (mixed $sizeInPoints, bool $nullOk=false) | |
| Set Size. | |
| setStrikethrough (bool $strikethru) | |
| Set Strikethrough. | |
| setStrikeType (string $strikeType) | |
| setSubscript (bool $subscript) | |
| Set Subscript. | |
| setSuperscript (bool $superscript) | |
| Set Superscript. | |
| setUnderline ($underlineStyle) | |
| Set Underline. | |
| setUnderlineColor (array $colorArray) | |
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 | |
| bool | $bold = false |
| Bold. | |
| string | $cap = null |
| Color | $color |
| Foreground color. | |
| bool | $isSupervisor |
| bool | $italic = false |
| Italic. | |
| string | $name = self::DEFAULT_FONT_NAME |
| Spreadsheet Supervisor | $parent |
| Parent. | |
| string | $parentPropertyName = null |
| Parent property name. | |
| string | $scheme = '' |
| float | $size = 11 |
| Font Size. | |
| bool | $strikethrough = false |
| Strikethrough. | |
| bool | $subscript = false |
| Subscript. | |
| bool | $superscript = false |
| Superscript. | |
| string | $underline = self::UNDERLINE_NONE |
| Underline. | |
| PhpOffice\PhpSpreadsheet\Style\Font::__construct | ( | bool | $isSupervisor = false, |
| bool | $isConditional = false ) |
Create a new Font.
| 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 |
| PhpOffice\PhpSpreadsheet\Style\Font::__clone | ( | ) |
Implement PHP __clone to create a deep clone, not just a shallow copy.
Reimplemented from PhpOffice\PhpSpreadsheet\Style\Supervisor.
| PhpOffice\PhpSpreadsheet\Style\Font::applyFromArray | ( | array | $styleArray | ) |
Apply styles from array.
$spreadsheet->getActiveSheet()->getStyle('B2')->getFont()->applyFromArray( [ 'name' => 'Arial', 'bold' => TRUE, 'italic' => FALSE, 'underline' => PhpOffice\PhpSpreadsheet\Style\Font\UNDERLINE_DOUBLE, 'strikethrough' => FALSE, 'color' => [ 'rgb' => '808080' ] ] );
| 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\Font::getHashCode | ( | ) |
|
inherited |
Get the currently active cell coordinate in currently active sheet.
Only used for supervisor.
| string | E.g. 'A1' |
| PhpOffice\PhpSpreadsheet\Style\Font::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\Font::getStyleArray | ( | array | $array | ) |
Build style array from subcomponents.
Reimplemented from PhpOffice\PhpSpreadsheet\Style\Supervisor.
| PhpOffice\PhpSpreadsheet\Style\Font::setBold | ( | bool | $bold | ) |
Set Bold.
| $this |
| PhpOffice\PhpSpreadsheet\Style\Font::setCap | ( | string | $cap | ) |
Set capitalization attribute.
If not one of the permitted values (all, small, or none), set it to null. This will be honored only for the font for chart titles. None is distinguished from null because null will inherit the current value, whereas 'none' will override it.
| PhpOffice\PhpSpreadsheet\Style\Font::setColor | ( | Color | $color | ) |
Set Color.
| $this |
| PhpOffice\PhpSpreadsheet\Style\Font::setItalic | ( | bool | $italic | ) |
Set Italic.
| $this |
| PhpOffice\PhpSpreadsheet\Style\Font::setSize | ( | mixed | $sizeInPoints, |
| bool | $nullOk = false ) |
Set Size.
| mixed | $sizeInPoints | A float representing the value of a positive measurement in points (1/72 of an inch) |
| $this |
| PhpOffice\PhpSpreadsheet\Style\Font::setStrikethrough | ( | bool | $strikethru | ) |
Set Strikethrough.
| $this |
| PhpOffice\PhpSpreadsheet\Style\Font::setSubscript | ( | bool | $subscript | ) |
Set Subscript.
| $this |
| PhpOffice\PhpSpreadsheet\Style\Font::setSuperscript | ( | bool | $superscript | ) |
Set Superscript.
| $this |
| PhpOffice\PhpSpreadsheet\Style\Font::setUnderline | ( | $underlineStyle | ) |
Set Underline.
| bool | string | $underlineStyle | PhpOffice\PhpSpreadsheet\Style\Font underline type If a boolean is passed, then TRUE equates to UNDERLINE_SINGLE, false equates to UNDERLINE_NONE |
| $this |
|
protectedinherited |
Parent.
Only used for supervisor.