| 1 | <?php |
||
| 7 | abstract class BaseWidget |
||
| 8 | { |
||
| 9 | public $template = null; |
||
| 10 | public $minifyOutput = true; |
||
| 11 | public $cacheLifeTime = 'env_default'; |
||
| 12 | public $contextAs = '$data'; |
||
| 13 | public $presenter = 'default'; |
||
| 14 | public $controller = null; |
||
| 15 | public $cacheTags = null; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * This method is called when you try to invoke the object like a function in blade files. |
||
| 19 | * like this : {!! $myWidgetObj('param1') !!} |
||
| 20 | * @param array $args |
||
| 21 | * @return string |
||
| 22 | */ |
||
| 23 | public function __invoke(...$args) |
||
| 27 | /** |
||
| 28 | * This method is called when you try to print the object like an string in blade files. |
||
| 29 | * like this : {!! $myWidgetObj !!} |
||
| 30 | */ |
||
| 31 | public function __toString() |
||
| 35 | |||
| 36 | public function render(...$args) |
||
| 40 | |||
| 41 | } |