class PostTemplateCondition implements ConditionInterface (View source)

Check against the current post's template

Methods

__construct(string $post_template, string|string[] $post_types = [])

Constructor

boolean
isSatisfied(Request $request)

Get whether the condition is satisfied

array
getArguments(Request $request)

Get an array of arguments for use in request

Details

__construct(string $post_template, string|string[] $post_types = [])

Constructor

Parameters

string $post_template
string|string[] $post_types

boolean isSatisfied(Request $request)

Get whether the condition is satisfied

Parameters

Request $request

Return Value

boolean

array getArguments(Request $request)

Get an array of arguments for use in request

Parameters

Request $request

Return Value

array