src/Ui/Form/Form.php 1 location
|
@@ 715-724 (lines=10) @@
|
| 712 |
|
* |
| 713 |
|
* @return FormPresenter |
| 714 |
|
*/ |
| 715 |
|
public function getPresenter() |
| 716 |
|
{ |
| 717 |
|
$presenter = get_class($this) . 'Presenter'; |
| 718 |
|
|
| 719 |
|
if (class_exists($presenter)) { |
| 720 |
|
return app()->make($presenter, ['object' => $this]); |
| 721 |
|
} |
| 722 |
|
|
| 723 |
|
return app()->make(FormPresenter::class, ['object' => $this]); |
| 724 |
|
} |
| 725 |
|
} |
| 726 |
|
|
src/Entry/EntryModel.php 1 location
|
@@ 720-729 (lines=10) @@
|
| 717 |
|
* |
| 718 |
|
* @return EntryPresenter |
| 719 |
|
*/ |
| 720 |
|
public function getPresenter() |
| 721 |
|
{ |
| 722 |
|
$presenter = substr(get_class($this), 0, -5) . 'Presenter'; |
| 723 |
|
|
| 724 |
|
if (class_exists($presenter)) { |
| 725 |
|
return app()->make($presenter, ['object' => $this]); |
| 726 |
|
} |
| 727 |
|
|
| 728 |
|
return new EntryPresenter($this); |
| 729 |
|
} |
| 730 |
|
|
| 731 |
|
/** |
| 732 |
|
* Return a new presenter instance. |