Automattic\WooCommerce\Vendor\GraphQL\Type\Definition
Argument::listFromConfig
Method of the class: Argument{}
No Hooks.
Returns
Array
Usage
$result = Argument::listFromConfig( $config ): array;
- $config(iterable) (required)
- .
Argument::listFromConfig() Argument::listFromConfig code WC 10.9.1
public static function listFromConfig(iterable $config): array
{
$list = [];
foreach ($config as $name => $argConfig) {
if (! is_array($argConfig)) {
$argConfig = ['type' => $argConfig];
}
/** @phpstan-var ArgumentConfig $argConfigWithName */
$argConfigWithName = $argConfig + ['name' => $name];
$list[] = new self($argConfigWithName);
}
return $list;
}