danog\MadelineProto\WebUI\Page: A page of the web UI: what the builtin login and status pages show.
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:
__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 = [])jsonSerialize(): arrayaddAlert(\danog\MadelineProto\WebUI\Alert ...$alerts): \danog\MadelineProto\WebUI\Page
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:stringTitle$lead:(string|\danog\MadelineProto\WebUI\SafeHtml)Introductory text$step:?\danog\MadelineProto\WebUI\StepCurrent step of the setup flow, if any$fields:list<\danog\MadelineProto\WebUI\Field>Form fields$submit:?stringLabel 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:?stringURL of the QR code login endpoint, to show the QR code login panel$template:stringTemplate used to render the page on the server$view:stringView used to render the page in the web app$data:array<string, mixed>Additional variables for custom templates
See also:
\danog\MadelineProto\WebUI\SafeHtml: A trusted HTML fragment, output as-is by templates instead of being escaped.\danog\MadelineProto\WebUI\Step: The steps of the setup flow, shown in the progress rail of the builtin pages.\danog\MadelineProto\WebUI\Field: A form field.\danog\MadelineProto\WebUI\Alert: A message shown on a page.\danog\MadelineProto\WebUI\Action: A secondary action of a form: a button that submitsname=valuewithout validating the form fields.
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