PartKeepr\SetupBundle\Services\UnitSetupService::getUnit PHP Method

getUnit() protected method

Checks if the specified SI Prefix.
protected getUnit ( string $name ) : Unit | null
$name string The footprint name
return PartKeepr\UnitBundle\Entity\Unit | null
    protected function getUnit($name)
    {
        $repository = $this->entityManager->getRepository('PartKeeprUnitBundle:Unit');
        return $repository->findOneBy(['name' => $name]);
    }