...
Simple example of a view:
Code Block | ||
---|---|---|
| ||
class BasicappPanelViews extends \Innomatic\Desktop\Panel\PanelViews { public function update($observable, $arg = '’) {} public function beginHelper() {} public function endHelper() {} public function viewDefault($eventData) { echo ‘Main view’; } } |
...
These helpers are useful for setting common interface parts and objects like panel localization catalog, top toolbar, bottom status bar, etc.
Code Block | ||
---|---|---|
| ||
public function beginHelper() { $this->localeCatalog = new \Innomatic\Locale\LocaleCatalog( 'example-basic-app::panel', $this->container->getCurrentUser()->getLanguage() ); } public function endHelper() { $this->pageTitle = $this->localeCatalog->getStr('panel_title'); } |