Automattic\WooCommerce\Api\Utils

SchemaHandle::make_rowprivate staticWC 1.0

Build a metadata row in the standard shape.

Method of the class: SchemaHandle{}

No Hooks.

Returns

Array{type:. string, field: ?string, argument: ?string, enumValue: ?string, entries: array<string, bool|int|float|string|null>, authorization: list<array{attribute: string, args: list<mixed>}>}

Usage

$result = SchemaHandle::make_row( $type, ?string $field, ?string $argument, ?string $enum_value, $entries, $authorization ): array;
$type(string) (required)
GraphQL type name.
?string $field(required)
.
?string $argument(required)
.
?string $enum_value(required)
.
$entries(array) (required)
.
$authorization(array) (required)
.

SchemaHandle::make_row() code WC 10.9.1

private static function make_row( string $type, ?string $field, ?string $argument, ?string $enum_value, array $entries, array $authorization ): array {
	return array(
		'type'          => $type,
		'field'         => $field,
		'argument'      => $argument,
		'enumValue'     => $enum_value,
		'entries'       => $entries,
		'authorization' => $authorization,
	);
}