modules/acm/src/Form/ConnectorSettingsForm.php
protected function getSkuFieldName($node_type) {
    $fields = $this->entityFieldManager
      ->getFieldDefinitions('node', $node_type);

    // Determine which field is used for sku references based on the configured
    // product node type.
    $sku_field_name = FALSE;
    foreach ($fields as $field_name => $field_instance) {
      $field_type = $field_instance->getType();
      if ($field_type == 'sku') {
        $sku_field_name = $field_name;
        break;
      }
    }

    return $sku_field_name;
  }
protected function getSkuFieldName($node_type) {
    $fields = $this->entityFieldManager
      ->getFieldDefinitions('node', $node_type);

    // Determine which field is used for sku references based on the configured
    // product node type.
    $sku_field_name = FALSE;
    foreach ($fields as $field_name => $field_instance) {
      $field_type = $field_instance->getType();
      if ($field_type == 'sku') {
        $sku_field_name = $field_name;
        break;
      }
    }

    return $sku_field_name;
  }
protected function getSkuFieldName ( $ node_type ) { $ fields = $ this -> entityFieldManager -> getFieldDefinitions ( 'node' , $ node_type ) ; // Determine which field is used for sku references based on the configured // product node type. $ sku_field_name = FALSE ; foreach ( $ fields as $ field_name => $ field_instance ) { $ field_type = $ field_instance -> getType ( ) ; if ( $ field_type == 'sku' ) { $ sku_field_name = $ field_name ; break ; } } return $ sku_field_name ; }
Gets the SKU field on a given node type.

@param string $node_type
The node type to scan.

@return string
The SKU field name.
Gets the SKU field on a given node type .