ClarksonCore

Clarkson_Template
in package

Table of Contents

$type  : string
The string here is the template name used by `::get_many()`.
__construct()  : mixed
get()  : Clarkson_Template|null
get_many()  : array<string|int, Clarkson_Template>
Get multiple templates, without pagination.
get_object()  : Clarkson_Object
Get the Clarkson object for this template.
get_one()  : Clarkson_Template|null
Gets the first result from a `::get_many()` query.

Properties

$type

The string here is the template name used by `::get_many()`.

public static string $type = ''

Methods

__construct()

public __construct(WP_Post $post) : mixed
Parameters
$post : WP_Post
Return values
mixed

get_many()

Get multiple templates, without pagination.

public static get_many(array<string|int, mixed> $args[, mixed &$post_query = null ]) : array<string|int, Clarkson_Template>
Parameters
$args : array<string|int, mixed>

Post query arguments.

$post_query : mixed = null

The $post_query is passed by reference and will be filled with the WP_Query that produced these results.

Tags
example

\Clarkson_Template::get_many( array( 'posts_per_page' => 5 ), $post_query );

Return values
array<string|int, Clarkson_Template>

get_one()

Gets the first result from a `::get_many()` query.

public static get_one([array<string|int, mixed> $args = array() ]) : Clarkson_Template|null
Parameters
$args : array<string|int, mixed> = array()

Post query arguments.

Return values
Clarkson_Template|null

        

Search results