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/Model/EloquentModel.php 1 location
|
@@ 150-159 (lines=10) @@
|
147 |
|
* |
148 |
|
* @return EloquentPresenter |
149 |
|
*/ |
150 |
|
public function getPresenter() |
151 |
|
{ |
152 |
|
$presenter = substr(get_class($this), 0, -5) . 'Presenter'; |
153 |
|
|
154 |
|
if (class_exists($presenter)) { |
155 |
|
return app()->make($presenter, ['object' => $this]); |
156 |
|
} |
157 |
|
|
158 |
|
return new EloquentPresenter($this); |
159 |
|
} |
160 |
|
|
161 |
|
/** |
162 |
|
* Return a new collection class with our models. |
src/Entry/EntryModel.php 1 location
|
@@ 789-798 (lines=10) @@
|
786 |
|
* |
787 |
|
* @return EntryPresenter |
788 |
|
*/ |
789 |
|
public function getPresenter() |
790 |
|
{ |
791 |
|
$presenter = substr(get_class($this), 0, -5) . 'Presenter'; |
792 |
|
|
793 |
|
if (class_exists($presenter)) { |
794 |
|
return app()->make($presenter, ['object' => $this]); |
795 |
|
} |
796 |
|
|
797 |
|
return new EntryPresenter($this); |
798 |
|
} |
799 |
|
|
800 |
|
/** |
801 |
|
* Return a new presenter instance. |