You are here

private function PHPExcel_Writer_HTML::_mapHAlign in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/HTML.php \PHPExcel_Writer_HTML::_mapHAlign()

* Map HAlign * *

Parameters

string $hAlign Horizontal alignment: * @return string|false

1 call to PHPExcel_Writer_HTML::_mapHAlign()
PHPExcel_Writer_HTML::_createCSSStyleAlignment in vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/HTML.php
* Create CSS style (PHPExcel_Style_Alignment) * *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/HTML.php, line 212

Class

PHPExcel_Writer_HTML
PHPExcel_Writer_HTML

Code

private function _mapHAlign($hAlign) {
  switch ($hAlign) {
    case PHPExcel_Style_Alignment::HORIZONTAL_GENERAL:
      return false;
    case PHPExcel_Style_Alignment::HORIZONTAL_LEFT:
      return 'left';
    case PHPExcel_Style_Alignment::HORIZONTAL_RIGHT:
      return 'right';
    case PHPExcel_Style_Alignment::HORIZONTAL_CENTER:
    case PHPExcel_Style_Alignment::HORIZONTAL_CENTER_CONTINUOUS:
      return 'center';
    case PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY:
      return 'justify';
    default:
      return false;
  }
}