Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Simple example of a view:

 

Code Block
languagephp
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
languagephp
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');
}