Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Field.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
15 class Field implements OutputFieldInterface
16 {
20  private $name;
21 
25  private $type;
26 
30  private $arguments;
31 
35  private $required;
36 
40  private $isList;
41 
45  private $resolver;
49  private $description;
50 
61  public function __construct(
62  string $name,
63  string $type,
64  bool $required,
65  bool $isList,
66  string $itemType = '',
67  string $resolver = '',
68  string $description = '',
69  array $arguments = []
70  ) {
71  $this->name = $name;
72  $this->type = $isList ? $itemType : $type;
73  $this->required = $required;
74  $this->isList = $isList;
75  $this->resolver = $resolver;
76  $this->description = $description;
77  $this->arguments = $arguments;
78  }
79 
85  public function getName() : string
86  {
87  return $this->name;
88  }
89 
95  public function getTypeName() : string
96  {
97  return $this->type;
98  }
99 
105  public function isList() : bool
106  {
107  return $this->isList;
108  }
109 
115  public function isRequired() : bool
116  {
117  return $this->required;
118  }
119 
125  public function getResolver() : string
126  {
127  return $this->resolver;
128  }
129 
135  public function getArguments() : array
136  {
137  return $this->arguments;
138  }
139 
145  public function getDescription() : string
146  {
147  return $this->description;
148  }
149 }
$type
Definition: item.phtml:13
__construct(string $name, string $type, bool $required, bool $isList, string $itemType='', string $resolver='', string $description='', array $arguments=[])
Definition: Field.php:61
$required
Definition: wrapper.phtml:8
if(!isset($_GET['name'])) $name
Definition: log.php:14