src/Ui/Form/Form.php 1 location
|
@@ 714-723 (lines=10) @@
|
711 |
|
* |
712 |
|
* @return FormPresenter |
713 |
|
*/ |
714 |
|
public function getPresenter() |
715 |
|
{ |
716 |
|
$presenter = get_class($this) . 'Presenter'; |
717 |
|
|
718 |
|
if (class_exists($presenter)) { |
719 |
|
return app()->make($presenter, ['object' => $this]); |
720 |
|
} |
721 |
|
|
722 |
|
return app()->make(FormPresenter::class, ['object' => $this]); |
723 |
|
} |
724 |
|
} |
725 |
|
|
src/Entry/EntryModel.php 1 location
|
@@ 763-772 (lines=10) @@
|
760 |
|
* |
761 |
|
* @return EntryPresenter |
762 |
|
*/ |
763 |
|
public function getPresenter() |
764 |
|
{ |
765 |
|
$presenter = substr(get_class($this), 0, -5) . 'Presenter'; |
766 |
|
|
767 |
|
if (class_exists($presenter)) { |
768 |
|
return app()->make($presenter, ['object' => $this]); |
769 |
|
} |
770 |
|
|
771 |
|
return new EntryPresenter($this); |
772 |
|
} |
773 |
|
|
774 |
|
/** |
775 |
|
* Return a new presenter instance. |
src/Model/EloquentModel.php 1 location
|
@@ 138-147 (lines=10) @@
|
135 |
|
* |
136 |
|
* @return EloquentPresenter |
137 |
|
*/ |
138 |
|
public function getPresenter() |
139 |
|
{ |
140 |
|
$presenter = substr(get_class($this), 0, -5) . 'Presenter'; |
141 |
|
|
142 |
|
if (class_exists($presenter)) { |
143 |
|
return app()->make($presenter, ['object' => $this]); |
144 |
|
} |
145 |
|
|
146 |
|
return new EloquentPresenter($this); |
147 |
|
} |
148 |
|
|
149 |
|
/** |
150 |
|
* Return a new collection class with our models. |