ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Bulky.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 use ILIAS\UI\Component as C;
25 
29 class 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",
59  $aria_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 }
getAriaRole()
Get the ARIA role on the button.
Definition: Bulky.php:71
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Bulky.php:21
withAriaRole(string $aria_role)
Get a button like this, but with an additional ARIA role.
Definition: Bulky.php:55
__construct(string $label, string $action)
Definition: Bulky.php:41