Skip to main content

GravityMath_Summary_Request

Value object that represents a summary request.

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:8

Details

  • Kind: class
  • Namespace: (global)

Methods

MethodDescription
from_array()Create a Request object from an array.
operation()The request operation.
form_id()Returns the form ID.
view_id()Returns the View ID.
is_sum()Whether this is a request to calculate the sum.
is_average()Whether this is a request to calculate the average.
is_minimum()Whether this is a request to calculate the minimum.
is_maximum()Whether this is a request to calculate the maximum.
is_count()Whether this is a request to calculate the count.
is_view_request()Returns whether the request is a View request.
is_order_by_field()Whether the results should be ordered by the field.
is_ordered_asc()Whether the results should be ordered by ASC.
is_entries_all()Whether to use all entries for the calculations.
limit()The amount to limit the results by.
group_by()The field to group by.
group_by_label()Returns the group by label.
operation_label()Returns the operation label.
applied_field()The field the operation is applied on.
decimals()Returns the amount of decimals to show.
filter()Returns the filter query string.
group_by_as_column()Returns the GROUP BY field as a GF Query Column.
applied_field_as_column()Returns the applied field as a GF Query Column.

Method Reference

from_array()

public static function from_array( array $request ): self

Create a Request object from an array.

Parameters

NameTypeDefaultDescription
$requestarrayThe request array.

Returns

  • self

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:182

operation()

public function operation(): string

The request operation.

Returns

  • string

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:207

form_id()

public function form_id(): int

Returns the form ID.

Returns

  • int

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:216

view_id()

public function view_id(): ?int

Returns the View ID.

Returns

  • int | null — The View ID.

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:227

is_sum()

public function is_sum(): bool

Whether this is a request to calculate the sum.

Returns

  • bool

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:236

is_average()

public function is_average(): bool

Whether this is a request to calculate the average.

Returns

  • bool

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:245

is_minimum()

public function is_minimum(): bool

Whether this is a request to calculate the minimum.

Returns

  • bool

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:254

is_maximum()

public function is_maximum(): bool

Whether this is a request to calculate the maximum.

Returns

  • bool

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:263

is_count()

public function is_count(): bool

Whether this is a request to calculate the count.

Returns

  • bool

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:272

is_view_request()

public function is_view_request(): bool

Returns whether the request is a View request.

Returns

  • bool — Whether the request is a View request.

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:283

is_order_by_field()

public function is_order_by_field(): bool

Whether the results should be ordered by the field.

Returns

  • bool

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:292

is_ordered_asc()

public function is_ordered_asc(): bool

Whether the results should be ordered by ASC.

Returns

  • bool

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:301

is_entries_all()

public function is_entries_all(): bool

Whether to use all entries for the calculations.

Returns

  • bool

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:310

limit()

public function limit(): int

The amount to limit the results by.

Returns

  • int

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:319

group_by()

public function group_by(): string

The field to group by.

Returns

  • string

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:336

group_by_label()

public function group_by_label(): string

Returns the group by label.

Returns

  • string

Since: 2.5.0 (The group by label.)

Source: includes/summary/class-gravitymath-summary-request.php:347

operation_label()

public function operation_label(): string

Returns the operation label.

Returns

  • string — The operation label.

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:358

applied_field()

public function applied_field(): ?string

The field the operation is applied on.

Returns

  • ?string

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:367

decimals()

public function decimals(): ?int

Returns the amount of decimals to show.

Returns

  • int | null — The amount of decimals.

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:382

filter()

public function filter(): string

Returns the filter query string.

Returns

  • string — The filter query string.

Since: 2.10.0

Source: includes/summary/class-gravitymath-summary-request.php:393

group_by_as_column()

public function group_by_as_column(): GF_Query_Column

Returns the GROUP BY field as a GF Query Column.

Returns

  • GF_Query_Column

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:411

applied_field_as_column()

public function applied_field_as_column(): GF_Query_Column

Returns the applied field as a GF Query Column.

Returns

  • GF_Query_Column

Since: 2.5.0

Source: includes/summary/class-gravitymath-summary-request.php:420