Skip to content

danog\MadelineProto\WebUI\Page: A page of the web UI: what the builtin login and status pages show.

Back to index

Author: Daniil Gentili daniil@daniil.it

A page of the web UI: what the builtin login and status pages show.

The page is rendered on the server by the template named by {@see self::$template} (by default page), which gets it in the $page variable; in the browser, the web app renders it again with the view named by {@see self::$view} (by default setup), from its JSON serialization.

Properties

  • $title: string
  • $lead: (danog\MadelineProto\WebUI\SafeHtml | string)
  • $step: ?danog\MadelineProto\WebUI\Step
  • $fields: array
  • $submit: ?string
  • $alerts: array
  • $actions: array
  • $instructions: array
  • $qrEndpoint: ?string
  • $template: string
  • $view: string
  • $data: array

Method list:

Methods:

__construct(string $title, (string|\danog\MadelineProto\WebUI\SafeHtml) $lead = '', ?\danog\MadelineProto\WebUI\Step $step = NULL, list<\danog\MadelineProto\WebUI\Field> $fields = [], ?string $submit = NULL, list<\danog\MadelineProto\WebUI\Alert> $alerts = [], list<\danog\MadelineProto\WebUI\Action> $actions = [], list<(string|\danog\MadelineProto\WebUI\SafeHtml)> $instructions = [], ?string $qrEndpoint = NULL, string $template = 'page', string $view = 'setup', array<string, mixed> $data = [])

Parameters:

  • $title: string Title
  • $lead: (string|\danog\MadelineProto\WebUI\SafeHtml) Introductory text
  • $step: ?\danog\MadelineProto\WebUI\Step Current step of the setup flow, if any
  • $fields: list<\danog\MadelineProto\WebUI\Field> Form fields
  • $submit: ?string Label of the submit button, or null if the page has no form
  • $alerts: list<\danog\MadelineProto\WebUI\Alert> Alerts
  • $actions: list<\danog\MadelineProto\WebUI\Action> Secondary actions of the form
  • $instructions: list<(string|\danog\MadelineProto\WebUI\SafeHtml)> Ordered list of instructions
  • $qrEndpoint: ?string URL of the QR code login endpoint, to show the QR code login panel
  • $template: string Template used to render the page on the server
  • $view: string View used to render the page in the web app
  • $data: array<string, mixed> Additional variables for custom templates

See also:

jsonSerialize(): array

addAlert(\danog\MadelineProto\WebUI\Alert ...$alerts): \danog\MadelineProto\WebUI\Page

Add alerts to the page.

Parameters:

  • ...$alerts: \danog\MadelineProto\WebUI\Alert

See also:


Generated by danog/phpdoc