ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Bulky.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
29class Bulky extends Button implements C\Button\Bulky
30{
31 // allowed ARIA roles
32 public const MENUITEM = 'menuitem';
33
34 protected ?string $aria_role = null;
35
39 protected static array $allowed_aria_roles = array(self::MENUITEM);
40
41 public function __construct(string $label, string $action)
42 {
43 $this->label = $label;
44 $this->action = $action;
45 }
46
55 public function withAriaRole(string $aria_role): C\Button\Bulky
56 {
57 $this->checkArgIsElement(
58 "role",
60 self::$allowed_aria_roles,
61 implode('/', self::$allowed_aria_roles)
62 );
63 $clone = clone $this;
64 $clone->aria_role = $aria_role;
65 return $clone;
66 }
67
71 public function getAriaRole(): ?string
72 {
73 return $this->aria_role;
74 }
75}
withAriaRole(string $aria_role)
Get a button like this, but with an additional ARIA role.
Definition: Bulky.php:55
getAriaRole()
Get the ARIA role on the button.
Definition: Bulky.php:71
__construct(string $label, string $action)
Definition: Bulky.php:41
This describes a symbol.
Definition: Symbol.php:30
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Bulky.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Bulky.php:21