WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports\PerformanceIndicators

Controller::get_allowed_items() public WC 1.0

Returns a list of allowed performance indicators.

{} It's a method of the class: Controller{}

No Hooks.

Return

Array|WP_Error. Nothing.

Usage

$Controller = new Controller();
$Controller->get_allowed_items( $request );
$request(WP_REST_Request) (required)
Request data.

Code of Controller::get_allowed_items() WC 5.2.2

<?php
public function get_allowed_items( $request ) {
	$indicator_data = $this->get_indicator_data();
	if ( is_wp_error( $indicator_data ) ) {
		return $indicator_data;
	}

	$data = array();
	foreach ( $this->allowed_stats as $stat ) {
		$pieces = $this->get_stats_parts( $stat );
		$report = $pieces[0];
		$chart  = $pieces[1];
		$data[] = (object) array(
			'stat'  => $stat,
			'chart' => $chart,
			'label' => $this->labels[ $stat ],
		);
	}

	usort( $data, array( $this, 'sort' ) );

	$objects = array();
	foreach ( $data as $item ) {
		$prepared  = $this->prepare_item_for_response( $item, $request );
		$objects[] = $this->prepare_response_for_collection( $prepared );
	}

	$response = rest_ensure_response( $objects );
	$response->header( 'X-WP-Total', count( $data ) );
	$response->header( 'X-WP-TotalPages', 1 );

	$base = add_query_arg( $request->get_query_params(), rest_url( sprintf( '/%s/%s', $this->namespace, $this->rest_base ) ) );

	return $response;
}