You are here

public static function PHPExcel_Calculation_Engineering::getConversionGroupUnitDetails in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Engineering.php \PHPExcel_Calculation_Engineering::getConversionGroupUnitDetails()

* getConversionGroupUnitDetails * *

Parameters

string $group The group whose units of measure you want to retrieve: * @return array

1 call to PHPExcel_Calculation_Engineering::getConversionGroupUnitDetails()
EngineeringTest::testGetConversionGroupUnitDetails in vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Calculation/EngineeringTest.php

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Engineering.php, line 2381

Class

PHPExcel_Calculation_Engineering
PHPExcel_Calculation_Engineering

Code

public static function getConversionGroupUnitDetails($group = NULL) {
  $conversionGroups = array();
  foreach (self::$_conversionUnits as $conversionUnit => $conversionGroup) {
    if (is_null($group) || $conversionGroup['Group'] == $group) {
      $conversionGroups[$conversionGroup['Group']][] = array(
        'unit' => $conversionUnit,
        'description' => $conversionGroup['Unit Name'],
      );
    }
  }
  return $conversionGroups;
}