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.
Property | Type | Description |
---|---|---|
$property | string |
string
|
$value | string |
string
|
$strict | bool |
bool
|
public
whereComponent (mixed $components, string $property, string $value, boolean $strict = false
)
: static
Returns objects whose component properties match the supplied value.
Property | Type | Description |
---|---|---|
$components | mixed |
mixed
|
$property | string |
string
|
$value | string |
string
|
$strict | boolean |
boolean
|
public
withComponent (string | array $components, null | callable $callback = null
)
: static
Returns objects that use the supplied component.
Property | Type | Description |
---|---|---|
$components | string | array |
string | array
|
$callback | null | callable |
null | callable
|
inherited
public
lists (string $value, string $key = null
)
: array
Get an array with the values of a given key.
Property | Type | Description |
---|---|---|
$value | string |
string
|
$key | string |
string
|