コード例 #1
0
 /**
  * @param ProductVariantInterface $variant
  * @param array $optionMap
  * @param mixed $permutation
  */
 private function addOptionValue(ProductVariantInterface $variant, array $optionMap, $permutation)
 {
     if (!is_array($permutation)) {
         $variant->addOptionValue($optionMap[$permutation]);
         return;
     }
     foreach ($permutation as $id) {
         $variant->addOptionValue($optionMap[$id]);
     }
 }