Function __global->get_content_object
Definitions
sources/content.php
- Get the CMA hook object for a content type. Also works for resource types (i.e. if it's a resource, although not actually considered content technically).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $content_type | ID_TEXT | No | No | required parameter | N/A | N/A | The content type |
Returns
- The object (null: could not get one)
- Type: ?object
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the CMA hook object for a content type. Also works for resource types (i.e. if it's a resource, although not actually considered content technically).
*
* @param ID_TEXT $content_type The content type
* @return ?object The object (null: could not get one)
*/
function get_content_object(string $content_type) : ?object
* Get the CMA hook object for a content type. Also works for resource types (i.e. if it's a resource, although not actually considered content technically).
*
* @param ID_TEXT $content_type The content type
* @return ?object The object (null: could not get one)
*/
function get_content_object(string $content_type) : ?object

