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
|
@@ 679-688 (lines=10) @@
|
| 676 |
|
* |
| 677 |
|
* @return EntryPresenter |
| 678 |
|
*/ |
| 679 |
|
public function getPresenter() |
| 680 |
|
{ |
| 681 |
|
$presenter = substr(get_class($this), 0, -5) . 'Presenter'; |
| 682 |
|
|
| 683 |
|
if (class_exists($presenter)) { |
| 684 |
|
return app()->make($presenter, ['object' => $this]); |
| 685 |
|
} |
| 686 |
|
|
| 687 |
|
return new EntryPresenter($this); |
| 688 |
|
} |
| 689 |
|
|
| 690 |
|
/** |
| 691 |
|
* Return a new presenter instance. |