Get unit symbols for a measure family

@param string $family the measure family

@return array the measure symbols
420898
public function getUnitSymbolsForFamily($family)
    {
        $familyConfig = $this->getFamilyConfig($family);
        $unitsConfig =  $familyConfig['units'];

        return array_map(
            function ($unit) {
                return $unit['symbol'];
            },
            $unitsConfig
        );
    }
1043211
private function mapUnits($units)
    {
        $gmagickUnits = [
            Gmagick::RESOLUTION_PIXELSPERCENTIMETER => 'PixelsPerCentimeter',
            Gmagick::RESOLUTION_PIXELSPERINCH       => 'PixelsPerInch',
            Gmagick::RESOLUTION_UNDEFINED           => 'undefined',
        ];

        if (!isset($gmagickUnits[$units])) {
            return $gmagickUnits[Gmagick::RESOLUTION_UNDEFINED];
        }

        return $gmagickUnits[$units];
    }
1274385
public function getConversions($unit)
    {
        if (!isset($this->units[$unit]['base'])) {
            throw new OutOfBoundsException('Unit is not set');
        }

        $units = array();

        foreach ($this->units as $key => $value) {
            if (isset($value['base']) && $value['base'] === $this->units[$unit]['base']) {
                array_push($units, $key);
            }
        }

        return $units;
    }
655231
public function spouseFamily(Individual $individual): ?Family
    {
        // Exclude families that were created after this census date
        $families = [];
        foreach ($individual->spouseFamilies() as $family) {
            if (Date::compare($family->getMarriageDate(), $this->date()) <= 0) {
                $families[] = $family;
            }
        }

        if (empty($families)) {
            return null;
        }

        usort($families, static function (Family $x, Family $y): int {
            return Date::compare($x->getMarriageDate(), $y->getMarriageDate());
        });

        return end($families);
    }
443310
public function getByParent(FamilyInterface $family)
    {
        $families = [];
        foreach ($this->families as $subFamily) {
            if ($subFamily->getParent() && $subFamily->getParent()->getCode() === $family->getCode()) {
                $families[$subFamily->getCode()] = $subFamily;
            }
        }

        return $families;
    }
946776
protected function _getClassIndices($class)
    {
        $indices = array ();
        if ($class == self::CLASS_LETTER) {
            $indices = array_merge(
                $this->_getClassIndices(self::CLASS_LOWER),
                $this->_getClassIndices(self::CLASS_UPPER)
            );
            sort($indices);
        } else {
            if (isset ($this->_tokenIndices[$class])) {
                $indices = $this->_tokenIndices[$class];
            }
        }

        return $indices;
    }
904295
public function getFamilyVariant($familyCode, $code): array
    {
        return $this->getFactory()
            ->createAkeneoPimAdapterFactory()
            ->createFamilyVariantApiAdapter()
            ->get($familyCode, $code);
    }
1045735
public function getFamily($code)
    {
        if (!$this->hasFamily($code)) {
            throw new MissingFamilyException($code);
        }

        return $this->families[$code];
    }
388840
protected function getAttributeMethods(FamilyInterface $family, AttributeInterface $attribute)
    {
        if ($this->isAttributeInherited($family, $attribute)) {
            return '';
        }
        $content = '';
        $dataClass = new \ReflectionClass($family->getDataClass());

        $getter = 'get'.ucfirst($attribute->getCode());
        if (!$dataClass->hasMethod($getter)) {
            $content .= $this->generateGetAnnotation($family, $attribute);
            $content .= "abstract public function {$getter}(array \$context = null);\n\n";
        }

        $setter = 'set'.ucfirst($attribute->getCode());
        if (!$dataClass->hasMethod($setter)) {
            $content .= $this->generateSetAnnotation($family, $attribute);
            $content .= 'abstract public function set'.ucfirst($attribute->getCode());
            $content .= '($value, array $context = null);'."\n\n";
        }

        if ($attribute->isCollection()) {
            // Adder and remover
            $setter = 'add'.ucfirst($attribute->getCode());
            if (!$dataClass->hasMethod($setter)) {
                $content .= $this->generateSetAnnotation($family, $attribute, true);
                $content .= 'abstract public function add'.ucfirst($attribute->getCode());
                $content .= '($value, array $context = null);'."\n\n";
            }

            $setter = 'remove'.ucfirst($attribute->getCode());
            if (!$dataClass->hasMethod($setter)) {
                $content .= $this->generateSetAnnotation($family, $attribute, true);
                $content .= 'abstract public function remove'.ucfirst($attribute->getCode());
                $content .= '($value, array $context = null);'."\n\n";
            }
        }

        return $content;
    }
81876
public function getOwnSynchronizer($family)
    {
        if(!array_key_exists($family, $this->synchronizersOwn))
        {
            throw new CoreException('Синхронизатор полей типа пакета '.$family.' не найдена в медиаторе!');
        }

        return $this->synchronizersOwn[$family];
    }
292104
public function lookUpClassProperty($symbolString)
    {
        $i = 0;
        $x = count($this->table) - 1;
        while (isset($this->table[$x - $i])) {
            if ($this->table[$x - $i]->scope() === TableScope::CLASS_LIKE_SCOPE) {
                $symbol = $this->table[$x - $i]->findSymbol($symbolString);
                if ($symbol instanceof Symbol) {
                    return $symbol;
                }

                return new Symbol($symbolString, '');
            }

            ++$i;
        }

        return new Symbol($symbolString, '');
    }
841819
public function unit($symbol, $string = false)
    {
        // Format instance's meter value and factor to the specified unit.
        $m    = number_format($this->m, static::$s, '.', '');
        $fact = number_format(static::factorToMeters($symbol), static::$s, '.',
          '');

        // Divide the meters by the factor and trim end of zeros
        $unit = bcdiv($m, $fact, static::$s);
        $unit = static::removeTrailingZeros($unit);

        // Return rounded double value, or string value.
        return $string ? $unit : round($unit, 20);
    }
336769
public function getFamily($family)
    {
        if(array_key_exists($family, $this->familyTypes))
        {
            return $this->familyTypes[$family];
        }
        else
        {
            throw new TaxonomyException('Не найдена коллекция типов пакета '.$family);
        }
    }
582141
public function getBMapper($family)
    {
        if(!array_key_exists($family, $this->mappersB))
        {
            throw new ExtractorException('Маппер агрегатных(B) типов пакета '.$family.' не найдена в медиаторе!');
        }

        return $this->mappersB[$family];
    }
1361120
protected function keyUnitsById() {
    $keyed_units = array();
    foreach ($this->units as $unit) {
      $keyed_units[$unit->getUnitId()] = $unit;
    }

    return $keyed_units;
  }
11764
public function getBDestructor($family)
    {
        if(!array_key_exists($family, $this->destructorsB))
        {
            throw new CoreException('Деструктор агрегатных(B) типов пакета '.$family.' не найдена в медиаторе!');
        }

        return $this->destructorsB[$family];
    }
1150582
public function getUnits($type = null)
    {
        if (!isset($type)) {
            return $this->units;
        }

        $filtered = array();
        foreach ($this->units as $key => $value) {
            if (isset($value['type']) && $value['type'] === $type) {
                $filtered[$key] = $value;
            }
        }

        return $filtered;
    }