CmsObjectCollection

This class represents a collection of Cms Objects.

 class Cms\Classes\CmsObjectCollection
extends Winter\Storm\Support\Collection

Extends

Class Description
Collection

Proxy class.

Methods

public where (string $property, string $value = null, bool $strict = null) : static

Returns objects whose properties match the supplied value.

Note that this deviates from Laravel 6's Illuminate\Support\Traits\EnumeratesValues::where() method signature, which uses ($key, $operator = null, $value = null) as parameters and that this class extends.

To ensure backwards compatibility with our current Halcyon functionality, this method retains the original parameters and functions the same way as before, with handling for the $value and $strict parameters to ensure they match the previously expected formats. This means that you cannot use operators for "where" queries on CMS object collections.

Parameters
Property Description
$property
string
$value
string
$strict
bool
Returns
static

public whereComponent (mixed $components, string $property, string $value, boolean $strict = false) : static

Returns objects whose component properties match the supplied value.

Parameters
Property Description
$components
mixed
$property
string
$value
string
$strict
boolean
Returns
static

public withComponent (string | array $components, null | callable $callback = null) : static

Returns objects that use the supplied component.

Parameters
Property Description
$components
string | array
$callback
null | callable
Returns
static

inherited public lists (string $value, string $key = null) : array

Inherited from Collection

Get an array with the values of a given key.

Parameters
Property Description
$value
string
$key
string
Returns
array
Copyright © 2024 Winter CMS