LLMS_REST_Controller::get_object_type( null|array $schema = null )

Retrieves the resource object-type this controller is responsible for managing.


Description Description

Overrides wp core get_object_type() to allow passing an item schema to retrieve the type from.


Top ↑

Parameters Parameters

$schema

(null|array) (Optional) The item schema. Default null.

Default value: null


Top ↑

Return Return

(string)


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-controller.php

	protected function get_object_type( $schema = null ) {

		if ( empty( $schema ) ) {
			return parent::get_object_type();
		}

		return $schema['title'];
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.27 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.