Field.php
641 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
namespace ACA\JetEngine\Field;
class Field {
/**
* @var array
*/
protected $settings;
public function __construct( $settings ) {
$this->settings = $settings;
}
/**
* @return string
*/
public function get_type() {
return $this->settings['type'];
}
/**
* @return string
*/
public function get_title() {
return (string) $this->settings['title'];
}
/**
* @return string
*/
public function get_name() {
return (string) $this->settings['name'];
}
/**
* @return bool
*/
public function is_required() {
return isset( $this->settings['is_required'] ) && $this->settings['is_required'];
}
}