src/Ui/Form/Form.php 1 location
|
@@ 699-708 (lines=10) @@
|
| 696 |
|
* |
| 697 |
|
* @return FormPresenter |
| 698 |
|
*/ |
| 699 |
|
public function getPresenter() |
| 700 |
|
{ |
| 701 |
|
$presenter = get_class($this) . 'Presenter'; |
| 702 |
|
|
| 703 |
|
if (class_exists($presenter)) { |
| 704 |
|
return app()->make($presenter, ['object' => $this]); |
| 705 |
|
} |
| 706 |
|
|
| 707 |
|
return app()->make(FormPresenter::class, ['object' => $this]); |
| 708 |
|
} |
| 709 |
|
} |
| 710 |
|
|
src/Entry/EntryModel.php 1 location
|
@@ 696-705 (lines=10) @@
|
| 693 |
|
* |
| 694 |
|
* @return EntryPresenter |
| 695 |
|
*/ |
| 696 |
|
public function getPresenter() |
| 697 |
|
{ |
| 698 |
|
$presenter = substr(get_class($this), 0, -5) . 'Presenter'; |
| 699 |
|
|
| 700 |
|
if (class_exists($presenter)) { |
| 701 |
|
return app()->make($presenter, ['object' => $this]); |
| 702 |
|
} |
| 703 |
|
|
| 704 |
|
return new EntryPresenter($this); |
| 705 |
|
} |
| 706 |
|
|
| 707 |
|
/** |
| 708 |
|
* Return a new presenter instance. |