Skip to content

Querying and Properties ​

Who's this page for?

Developers working with the code.

The plugin attaches new query params and element properties to Entry/EntryQuery and Asset/AssetQuery, wherever the corresponding edition feature is enabled (EntryVerification or AssetVerification).

WARNING

Calling these on an element type, or on an install/edition where the corresponding feature isn't enabled, throws UnknownMethodException because the Yii behavior hasn't been attached in that case.

Query params ​

See below for code examples.

ParamTypeDefaultDescription
isVerified()booltrueWhether the results are currently verified or already expired. A null "Verified until" date counts as verified indefinitely.
isAssigned()booltrueWhether the results have a reviewer assigned.
verifiedUntilDate()mixed(required)The "Verified until" date to filter by. Accepts the same formats as Craft's native date params: a DateTime object, a date string, an operator-prefixed string (e.g. '< 2026-08-22'), an array of these, or :empty: / not :empty:.
reviewerId()int|array|nullnullThe Craft user ID(s) assigned to verify the elements.

TIP

These params always apply a filter when called, including with no arguments (there's no "unfiltered" call). The Default column below is the value used when a param is called with no argument (e.g. .reviewerId() filters for reviewerId IS NULL, it doesn't skip filtering). Leave a param out entirely to not filter by it at all.

Element properties ​

See below for code examples.

PropertyTypeDefaultDescription
isVerifiedbool (read-only)trueWhether the element is currently verified or already expired.
hasVerifiedUntilDatebool (read-only)falseWhether a "Verified until" date is set at all.
verifiedUntilDateDateTime|nullnullThe "Verified until" date, or null for "Indefinitely".
reviewerIdint|nullnullThe assigned reviewer's user ID.
reviewerUser|null (read-only)nullThe assigned reviewer.
verificationStatusVerificationStatus (read-only)VerifiedThe Verified/Expired enum case; call .label() for a human-readable string.

Examples ​

The query params and element properties above can be used for either entries or assets. Here are some examples:

Entries ​

Let's say you want Entry job listings that are assigned to reviewer 1 and expire before August 22, 2026:

twig
{% set jobEntries = craft.entries
    .section('jobListings')
    .verifiedUntilDate('< 2026-08-22')
    .reviewerId(1)
    .all()
%}

{% for entry in jobEntries %}
    <tr>
        <td>{{ entry.title }}</td>
        <td>{{ entry.reviewer ? entry.reviewer.friendlyName : 'Unassigned' }}</td>
        <td>{{ entry.verifiedUntilDate ? entry.verifiedUntilDate|date('Y-m-d') : 'Indefinitely' }}</td>
        <td>{{ entry.verificationStatus.label() }}</td>
    </tr>
{% endfor %}
php
use craft\elements\Entry;

$jobEntries = Entry::find()
    ->section('jobListings')
    ->verifiedUntilDate('< 2026-08-22')
    ->reviewerId(1)
    ->all();

foreach ($jobEntries as $entry) {
    $reviewerName = $entry->reviewer?->friendlyName ?? 'Unassigned';
    $verifiedUntil = $entry->verifiedUntilDate?->format('Y-m-d') ?? 'Indefinitely';
    $status = $entry->verificationStatus->label();
    // do something with the data
}

Assets ​

Let's say you want expired certification Asset documents that still need a reviewer assigned:

twig
{% set certificationAssets = craft.assets
    .volume('certifications')
    .isVerified(false)
    .isAssigned(false)
    .all()
%}

{% for asset in certificationAssets %}
    <tr>
        <td>{{ asset.title }}</td>
        <td>{{ asset.reviewer ? asset.reviewer.friendlyName : 'Unassigned' }}</td>
        <td>{{ asset.verifiedUntilDate ? asset.verifiedUntilDate|date('Y-m-d') : 'Indefinitely' }}</td>
        <td>{{ asset.verificationStatus.label() }}</td>
    </tr>
{% endfor %}
php
use craft\elements\Asset;

$certificationAssets = Asset::find()
    ->volume('certifications')
    ->isVerified(false)
    ->isAssigned(false)
    ->all();

foreach ($certificationAssets as $asset) {
    $reviewerName = $asset->reviewer?->friendlyName ?? 'Unassigned';
    $verifiedUntil = $asset->verifiedUntilDate?->format('Y-m-d') ?? 'Indefinitely';
    $status = $asset->verificationStatus->label();
    // do something with the data
}

Released under The Craft License (v2.1.0)