Skip to content

Commit d0ab8bd

Browse files
committed
schema
1 parent 3e624d9 commit d0ab8bd

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

Readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
3+
```
4+
vendor/bin/xervice dataprovider:generate
5+
```

message_info/UserAPIDataProvider.php

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ final class UserAPIDataProvider extends \Xervice\DataProvider\Business\Model\Dat
1616
/** @var string */
1717
protected $role;
1818

19+
/** @var string */
20+
protected $stateIso;
21+
1922

2023
/**
2124
* @return int
@@ -140,6 +143,47 @@ public function hasRole()
140143
}
141144

142145

146+
/**
147+
* @return string
148+
*/
149+
public function getStateIso(): string
150+
{
151+
return $this->stateIso;
152+
}
153+
154+
155+
/**
156+
* @param string $stateIso
157+
* @return UserAPIDataProvider
158+
*/
159+
public function setStateIso(string $stateIso)
160+
{
161+
$this->stateIso = $stateIso;
162+
163+
return $this;
164+
}
165+
166+
167+
/**
168+
* @return UserAPIDataProvider
169+
*/
170+
public function unsetStateIso()
171+
{
172+
$this->stateIso = null;
173+
174+
return $this;
175+
}
176+
177+
178+
/**
179+
* @return bool
180+
*/
181+
public function hasStateIso()
182+
{
183+
return ($this->stateIso !== null && $this->stateIso !== []);
184+
}
185+
186+
143187
/**
144188
* @return array
145189
*/
@@ -176,6 +220,16 @@ protected function getElements(): array
176220
'is_dataprovider' => false,
177221
'isCamelCase' => false,
178222
),
223+
'stateIso' =>
224+
array (
225+
'name' => 'stateIso',
226+
'allownull' => false,
227+
'default' => '',
228+
'type' => 'string',
229+
'is_collection' => false,
230+
'is_dataprovider' => false,
231+
'isCamelCase' => false,
232+
),
179233
);
180234
}
181235
}

schema/schema.dataprovider.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<DataElement name="userId" type="int"/>
3434
<DataElement name="email" type="string"/>
3535
<DataElement name="role" type="string"/>
36+
<DataElement name="stateIso" type="string"/>
3637
</DataProvider>
3738

3839
<DataProvider name="UserListAPI">

0 commit comments

Comments
 (0)