PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.8
GiveWP – Donation Plugin and Fundraising Platform v4.16.8
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
give / src / Framework / FieldsAPI / Authentication.php
Authentication.php
77 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Give\Framework\FieldsAPI;
6
7 class Authentication extends Group
8 {
9 const TYPE = 'authentication';
10
11 protected $required = false;
12 protected $isAuthenticated = false;
13 protected $loginRedirect = false;
14 protected $loginRedirectUrl;
15 protected $loginNotice;
16 protected $loginConfirmation;
17 protected $lostPasswordUrl;
18
19 public static function make($name)
20 {
21 return parent::make($name)
22 ->append(
23 Text::make('login')
24 ->label(__('Username', 'give'))
25 ->placeholder(__('Enter your username or email', 'give'))
26 )
27 ->append(
28 Password::make('password')
29 ->label(__('Password', 'give'))
30 ->placeholder(__('Enter your password', 'give'))
31 );
32 }
33
34 public function required($value = true): self
35 {
36 $this->required = $value;
37 return $this;
38 }
39
40 public function isAuthenticated($value = true): self
41 {
42 $this->isAuthenticated = $value;
43 return $this;
44 }
45
46 public function loginRedirect($value = true): self
47 {
48 $this->loginRedirect = $value;
49 return $this;
50 }
51
52 public function loginRedirectUrl($value): self
53 {
54 $this->loginRedirectUrl = $value;
55 return $this;
56 }
57
58 public function loginNotice($value): self
59 {
60 $this->loginNotice = $value;
61 return $this;
62 }
63
64 public function loginConfirmation($value): self
65 {
66 $this->loginConfirmation = $value;
67 return $this;
68 }
69
70
71 public function lostPasswordUrl($value): self
72 {
73 $this->lostPasswordUrl = $value;
74 return $this;
75 }
76 }
77