コード例 #1
0
ファイル: AttributeManager.php プロジェクト: spryker/Product
 /**
  * @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;
 }