modules/acm_sku/src/Plugin/AcquiaCommerce/SKUType/Configurable.php
public static function getChildren(SKU $sku) {
    $children = [];

    foreach ($sku->get('field_configured_skus')->getValue() as $child) {
      if (empty($child['value'])) {
        continue;
      }

      $child_sku = SKU::loadFromSku($child['value']);
      if ($child_sku instanceof SKU) {
        $children[$child_sku->getSKU()] = $child_sku;
      }
    }

    return $children;
  }
public static function getChildren(SKU $sku) {
    $children = [];

    foreach ($sku->get('field_configured_skus')->getValue() as $child) {
      if (empty($child['value'])) {
        continue;
      }

      $child_sku = SKU::loadFromSku($child['value']);
      if ($child_sku instanceof SKU) {
        $children[$child_sku->getSKU()] = $child_sku;
      }
    }

    return $children;
  }
public static function getChildren ( SKU $ sku ) { $ children = [ ] ; foreach ( $ sku -> get ( 'field_configured_skus' ) -> getValue ( ) as $ child ) { if ( empty ( $ child [ 'value' ] ) ) { continue ; } $ child_sku = SKU :: loadFromSku ( $ child [ 'value' ] ) ; if ( $ child_sku instanceof SKU ) { $ children [ $ child_sku -> getSKU ( ) ] = $ child_sku ; } } return $ children ; }
Wrapper function to get available children for a configurable SKU.

@param \Drupal\acm_sku\Entity\SKU $sku
Configurable SKU.

@return array
Full loaded child SKUs.
Wrapper function to get available children for a configurable SKU .