<?php

namespace Hubleto\App\Community\Help;

class Loader extends \Hubleto\Erp\App
{
  public bool $canBeDisabled = false;
  public bool $permittedForAllUsers = true;

  public array $contextHelp = [];

  /**
   * Inits the app: adds routes, settings, calendars, event listeners, menu items, ...
   *
   * @return void
   * 
   */
  public function init(): void
  {
    parent::init();

    $this->router()->get([
      '/^help\/?$/' => Controllers\Help::class,
      '/^help\/search\/?$/' => Controllers\Search::class,
    ]);

    $this->contextHelp = $this->collectExtendibles('ContextHelp');
  }

}
