ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
class.ilPCLoginPageElement.php
Go to the documentation of this file.
1 <?php
2 
26 {
27  private static array $types = array(
28  'login-form' => 'login_form',
29  'shibboleth-login-form' => 'shib_login_form',
30  'openid-connect-login' => 'openid_connect_login',
31  'registration-link' => 'registration_link',
32  'user-agreement' => 'user_agreement_link',
33  'dpro-agreement' => 'dpro_agreement_link',
34  'saml-login' => 'saml_login'
35  );
36 
40  public static function getAllTypes(): array
41  {
42  return self::$types;
43  }
44 
45  public function init(): void
46  {
47  $this->setType('lpe');
48  }
49 
50  public function create(
51  ilPageObject $a_pg_obj,
52  string $a_hier_id,
53  string $a_pc_id = ""
54  ): void {
55  $this->createInitialChildNode($a_hier_id, $a_pc_id, "LoginPageElement");
56  }
57 
58  public function setLoginPageElementType(string $a_type): void
59  {
60  if (!empty($a_type)) {
61  $this->getChildNode()->setAttribute('Type', $a_type);
62  }
63  }
64 
65  public function getLoginPageElementType(): string
66  {
67  if (is_object($this->getChildNode())) {
68  return $this->getChildNode()->getAttribute('Type');
69  }
70  return "";
71  }
72 
73  public function setAlignment(string $a_alignment): void
74  {
75  $this->getChildNode()->setAttribute('HorizontalAlign', $a_alignment);
76  }
77 
78  public function getAlignment(): string
79  {
80  if (is_object($this->getChildNode())) {
81  return $this->getChildNode()->getAttribute('HorizontalAlign');
82  }
83  return "";
84  }
85 
86  public static function getLangVars(): array
87  {
88  return array("ed_insert_login_page_element");
89  }
90 }
setType(string $a_type)
Set Type.
static getAllTypes()
Get all types.
Content object of ilPageObject (see ILIAS DTD).
create(ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
setAlignment(string $a_alignment)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
createInitialChildNode(string $hier_id, string $pc_id, string $child, array $child_attributes=[])