src/Entry/EntryModel.php 1 location
|
@@ 744-753 (lines=10) @@
|
741 |
|
* @param array $items |
742 |
|
* @return EntryCollection |
743 |
|
*/ |
744 |
|
public function newCollection(array $items = []) |
745 |
|
{ |
746 |
|
$collection = substr(get_class($this), 0, -5) . 'Collection'; |
747 |
|
|
748 |
|
if (class_exists($collection)) { |
749 |
|
return new $collection($items); |
750 |
|
} |
751 |
|
|
752 |
|
return new EntryCollection($items); |
753 |
|
} |
754 |
|
|
755 |
|
/** |
756 |
|
* Return the entry presenter. |
src/Model/EloquentModel.php 1 location
|
@@ 155-164 (lines=10) @@
|
152 |
|
* @param array $items |
153 |
|
* @return Collection |
154 |
|
*/ |
155 |
|
public function newCollection(array $items = []) |
156 |
|
{ |
157 |
|
$collection = substr(get_class($this), 0, -5) . 'Collection'; |
158 |
|
|
159 |
|
if (class_exists($collection)) { |
160 |
|
return new $collection($items); |
161 |
|
} |
162 |
|
|
163 |
|
return new EloquentCollection($items); |
164 |
|
} |
165 |
|
|
166 |
|
/** |
167 |
|
* Return the translatable flag. |