WC_REST_System_Status_Tools_Controller::get_items PHP Method

get_items() public method

Get a list of system status tools.
public get_items ( WP_REST_Request $request ) : WP_Error | WP_REST_Response
$request WP_REST_Request Full details about the request.
return WP_Error | WP_REST_Response
    public function get_items($request)
    {
        $tools = array();
        foreach ($this->get_tools() as $id => $tool) {
            $tools[] = $this->prepare_response_for_collection($this->prepare_item_for_response(array('id' => $id, 'name' => $tool['name'], 'action' => $tool['button'], 'description' => $tool['desc']), $request));
        }
        $response = rest_ensure_response($tools);
        return $response;
    }