advanced-rule.php
2 years ago
match-not-regexp-rule.php
2 years ago
match-regexp-rule.php
2 years ago
must-contain-characters-rule.php
2 years ago
must-equal-rule.php
2 years ago
must-not-contain-characters-rule.php
2 years ago
server-side-rule.php
2 years ago
advanced-rule.php
32 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace Jet_Form_Builder\Blocks\Advanced_Rules; |
| 5 | |
| 6 | use Jet_Form_Builder\Classes\Arrayable\Arrayable; |
| 7 | |
| 8 | // If this file is called directly, abort. |
| 9 | if ( ! defined( 'WPINC' ) ) { |
| 10 | die; |
| 11 | } |
| 12 | |
| 13 | abstract class Advanced_Rule implements Arrayable { |
| 14 | |
| 15 | abstract public function get_id(): string; |
| 16 | |
| 17 | abstract public function get_label(): string; |
| 18 | |
| 19 | public function get_control_label(): string { |
| 20 | return __( 'Symbols', 'jet-form-builder' ); |
| 21 | } |
| 22 | |
| 23 | public function to_array(): array { |
| 24 | return array( |
| 25 | 'value' => $this->get_id(), |
| 26 | 'label' => $this->get_label(), |
| 27 | 'control_label' => $this->get_control_label(), |
| 28 | ); |
| 29 | } |
| 30 | |
| 31 | } |
| 32 |