HORIZONTAL_GENERAL
HORIZONTAL_GENERAL = 'general'
$isSupervisor : bool
Supervisor?
$parent : \PhpOffice\PhpSpreadsheet\Spreadsheet|\PhpOffice\PhpSpreadsheet\Style\Style
Parent. Only used for supervisor.
$parentPropertyName : null|string
Parent property name.
$horizontal : string
Horizontal alignment.
$vertical : string
Vertical alignment.
$textRotation : int
Text rotation.
$wrapText : bool
Wrap text.
$shrinkToFit : bool
Shrink to fit.
$indent : int
Indent - only possible with horizontal alignment left and right.
$readOrder : int
Read order.
__construct(bool $isSupervisor = false, bool $isConditional = false) : mixed
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 |
bindParent(\PhpOffice\PhpSpreadsheet\Spreadsheet|\PhpOffice\PhpSpreadsheet\Style\Style $parent, null|string $parentPropertyName = null) : \PhpOffice\PhpSpreadsheet\Style\Supervisor
Bind parent. Only used for supervisor.
\PhpOffice\PhpSpreadsheet\Spreadsheet|\PhpOffice\PhpSpreadsheet\Style\Style | $parent | |
null|string | $parentPropertyName |
applyFromArray(array $pStyles) : \PhpOffice\PhpSpreadsheet\Style\Alignment
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 | $pStyles | Array containing style information |