/** * @param string $attributeType * * @throws \Spryker\Zed\Product\Business\Exception\MissingAttributeTypeException * * @return \Orm\Zed\Product\Persistence\SpyProductAttributeType */ protected function getAttributeType($attributeType) { $attributeTypeQuery = $this->productQueryContainer->queryAttributeTypeByName($attributeType); $attributeType = $attributeTypeQuery->findOne(); if (!$attributeType) { throw new MissingAttributeTypeException(sprintf('Tried to retrieve a missing attribute type: %s', $attributeType)); } return $attributeType; }