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.
Parameters Parameters
- $schema
-
(null|array) (Optional) The item schema. Default
null.Default value: null
Return Return
(string)
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'];
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0-beta.27 | Introduced. |