src/Entry/EntryModel.php 1 location
|
@@ 653-662 (lines=10) @@
|
650 |
|
* @param array $items |
651 |
|
* @return EntryCollection |
652 |
|
*/ |
653 |
|
public function newCollection(array $items = []) |
654 |
|
{ |
655 |
|
$collection = substr(get_class($this), 0, -5) . 'Collection'; |
656 |
|
|
657 |
|
if (class_exists($collection)) { |
658 |
|
return new $collection($items); |
659 |
|
} |
660 |
|
|
661 |
|
return new EntryCollection($items); |
662 |
|
} |
663 |
|
|
664 |
|
/** |
665 |
|
* Return the entry presenter. |
src/Model/EloquentModel.php 1 location
|
@@ 129-138 (lines=10) @@
|
126 |
|
* @param array $items |
127 |
|
* @return Collection |
128 |
|
*/ |
129 |
|
public function newCollection(array $items = array()) |
130 |
|
{ |
131 |
|
$collection = substr(get_class($this), 0, -5) . 'Collection'; |
132 |
|
|
133 |
|
if (class_exists($collection)) { |
134 |
|
return new $collection($items); |
135 |
|
} |
136 |
|
|
137 |
|
return new EloquentCollection($items); |
138 |
|
} |
139 |
|
|
140 |
|
/** |
141 |
|
* Return the translatable flag. |