Abstract for collections.
- See also
- CustomCollection
-
SmartCollection
|
const | MAP |
|
const | SCOPE_GLOBAL = 'global' |
|
const | SCOPE_WEB = 'web' |
|
const | SORT_ALPHA_ASC = 'alpha-asc' |
|
const | SORT_ALPHA_DESC = 'alpha-desc' |
|
const | SORT_BEST_SELLING = 'best-selling' |
|
const | SORT_CREATED = 'created' |
|
const | SORT_CREATED_DESC = 'created-desc' |
|
const | SORT_MANUAL = 'manual' |
|
const | SORT_PRICE_ASC = 'price-asc' |
|
const | SORT_PRICE_DESC = 'price-desc' |
|
const | DIR = '' |
| All subclasses must redeclare this to match their REST directory (without container). More...
|
|
const | TYPE = '' |
| All subclasses must redeclare this to match their types. More...
|
|
const | MAP = [] |
|
const | PATCH = [] |
|
|
Api | $api |
|
Pool | $pool |
|
static null self | load ($caller, string $id, array $query=[]) |
|
static self[] | loadAll ($caller, string $path, array $query=[]) |
|
null AbstractEntity | _container () |
| The container/owner object, if any. More...
|
|
mixed | _get (string $field) |
| Lazy-loads missing fields. More...
|
|
void | _onDelete () |
|
void | _onSave () |
|
void | _reload (string $field) |
|
mixed | _hydrate (string $class, $item) |
| A factory that also hydrates / caches entities. More...
|
|
array | _select ($subject, callable $filter,... $args) |
| Magic method: selectField(callable $filter) More...
|
|
$this | _setData (array $data) |
| Clears all diffs and sets all data, hydrating mapped fields. More...
|
|
$this | _setField (string $field, $value) |
| Sets a value, hydrating if mapped, and clears the diff. More...
|
|
string | _dir () |
| The POST directory. More...
|
|
string | _metafieldType () |
|
◆ MAP
Initial value:= [
'image' => Image::class,
]
◆ getBodyHtml()
magic string getBodyHtml |
( |
| ) |
|
◆ getHandle()
magic string getHandle |
( |
| ) |
|
◆ getImage()
magic null Image getImage |
( |
| ) |
|
◆ getProducts()
◆ getPublishedAt()
magic null string getPublishedAt |
( |
| ) |
|
◆ getPublishedScope()
magic string getPublishedScope |
( |
| ) |
|
web|global
, read-only for custom collections.
- Returns
- string
◆ getSortOrder()
magic string getSortOrder |
( |
| ) |
|
See the sort constants.
- Returns
- string
◆ getTemplateSuffix()
magic string getTemplateSuffix |
( |
| ) |
|
◆ getTitle()
magic string getTitle |
( |
| ) |
|
◆ getUpdatedAt()
magic string getUpdatedAt |
( |
| ) |
|
◆ newCollect()
◆ setBodyHtml()
magic $this setBodyHtml |
( |
string |
$html | ) |
|
◆ setHandle()
magic $this setHandle |
( |
string |
$handle | ) |
|
◆ setImage()
magic $this setImage |
( |
?Image |
$image | ) |
|
◆ setSortOrder()
magic $this setSortOrder |
( |
string |
$order | ) |
|
See the sort constants.
- Returns
- $this
◆ setTemplateSuffix()
magic $this setTemplateSuffix |
( |
string |
$suffix | ) |
|
◆ setTitle()
magic $this setTitle |
( |
string |
$title | ) |
|