src/Entry/EntryModel.php 1 location
|
@@ 660-669 (lines=10) @@
|
| 657 |
|
* @param array $items |
| 658 |
|
* @return EntryCollection |
| 659 |
|
*/ |
| 660 |
|
public function newCollection(array $items = []) |
| 661 |
|
{ |
| 662 |
|
$collection = substr(get_class($this), 0, -5) . 'Collection'; |
| 663 |
|
|
| 664 |
|
if (class_exists($collection)) { |
| 665 |
|
return new $collection($items); |
| 666 |
|
} |
| 667 |
|
|
| 668 |
|
return new EntryCollection($items); |
| 669 |
|
} |
| 670 |
|
|
| 671 |
|
/** |
| 672 |
|
* 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. |