Automattic\WooCommerce\Internal\Api
QueryComplexityRule::buildFieldArguments
Build the argument values handed to a field's complexity callback.
Same semantics as the stock rule, but variable values are coerced once per document (see {@see self::get_coerced_variable_values()}).
Method of the class: QueryComplexityRule{}
No Hooks.
Returns
array<string, mixed>. The coerced argument values.
Usage
// protected - for code of main (parent) or child class $result = $this->buildFieldArguments( $node ): array;
- $node(FieldNode) (required)
- The field node.
QueryComplexityRule::buildFieldArguments() QueryComplexityRule::buildFieldArguments code WC 11.1.2
protected function buildFieldArguments( FieldNode $node ): array {
$field_definition = $this->fieldDefinition( $node );
return $field_definition instanceof FieldDefinition
? Values::getArgumentValues( $field_definition, $node, $this->get_coerced_variable_values() )
: array();
}