Skip to content

Commit 4e3f484

Browse files
committed
Add more pirate data and make nicknales a multi value field
1 parent f2c6a93 commit 4e3f484

2 files changed

Lines changed: 175 additions & 6 deletions

File tree

modules/bc_api_example/bc_api_example.data.inc

Lines changed: 174 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,26 @@ function bc_api_example_get_nationalities_data() {
3030
'label' => 'Scotland',
3131
'tid' => NULL,
3232
],
33+
'china' => [
34+
'label' => 'China',
35+
'tid' => NULL,
36+
],
37+
'united_states' => [
38+
'label' => 'United States',
39+
'tid' => NULL,
40+
],
41+
'united_kingdom' => [
42+
'label' => 'United Kingdom',
43+
'tid' => NULL,
44+
],
45+
'jamaica' => [
46+
'label' => 'Jamaica',
47+
'tid' => NULL,
48+
],
49+
'france' => [
50+
'label' => 'France',
51+
'tid' => NULL,
52+
],
3353
];
3454
}
3555

@@ -58,6 +78,38 @@ function bc_api_example_get_ships_data() {
5878
'title' => 'Adventure Galley',
5979
'nid' => NULL,
6080
],
81+
'red_flag_fleet' => [
82+
'title' => 'Red Flag Fleet',
83+
'nid' => NULL,
84+
],
85+
'fancy' => [
86+
'title' => 'Fancy',
87+
'nid' => NULL,
88+
],
89+
'the_ghost' => [
90+
'title' => 'The Ghost',
91+
'nid' => NULL,
92+
],
93+
'whydah_gally' => [
94+
'title' => 'Whydah Gally',
95+
'nid' => NULL,
96+
],
97+
'ranger' => [
98+
'title' => 'Ranger',
99+
'nid' => NULL,
100+
],
101+
'la_trompeuse' => [
102+
'title' => 'La Trompeuse',
103+
'nid' => NULL,
104+
],
105+
'pirate_queen' => [
106+
'title' => 'pirate_queen',
107+
'nid' => NULL,
108+
],
109+
'blessed_william' => [
110+
'title' => 'Blessed William',
111+
'nid' => NULL,
112+
],
61113
];
62114
}
63115

@@ -71,7 +123,7 @@ function bc_api_example_get_pirates_data() {
71123
'status' => 1,
72124
'title' => 'Edward Teach',
73125
'body' => "",
74-
'nickname' => "Blackbeard",
126+
'nickname' => ["Blackbeard"],
75127
'nationality' => ['england'],
76128
'ships' => ['queen_anne'],
77129
],
@@ -80,7 +132,7 @@ function bc_api_example_get_pirates_data() {
80132
'status' => 1,
81133
'title' => 'Bartholomew Roberts',
82134
'body' => "",
83-
'nickname' => "Black Bart",
135+
'nickname' => ["Black Bart", "The Dread Pirate"],
84136
'nationality' => ['wales'],
85137
'ships' => ['royal_fortune'],
86138
],
@@ -89,15 +141,15 @@ function bc_api_example_get_pirates_data() {
89141
'status' => 1,
90142
'title' => 'Sam Bellamy',
91143
'body' => "",
92-
'nickname' => "Black Sam",
144+
'nickname' => ["Black Sam"],
93145
'nationality' => ['england'],
94146
'ships' => ['whydah'],
95147
],
96148
'stede_bonnet' => [
97149
'nid' => NULL,
98150
'status' => 1,
99151
'title' => 'Stede Bonnet',
100-
'nickname' => "The Gentleman Pirate",
152+
'nickname' => ["The Gentleman Pirate"],
101153
'body' => "Nicknamed \"The Gentleman Pirate\", Bonnet was born into a wealthy family before turning to piracy.",
102154
'nationality' => ['barbados'],
103155
'ships' => ['revenge'],
@@ -106,10 +158,127 @@ function bc_api_example_get_pirates_data() {
106158
'nid' => NULL,
107159
'status' => 1,
108160
'title' => 'William Kidd',
109-
'nickname' => "Captain",
161+
'nickname' => ["Captain", "Captain Kidd"],
110162
'body' => "Although modern historians dispute the legitimacy of his trial and execution, the rumor of Captain Kidd's buried treasure has served only to build a legend around the man as a great pirate. His property was claimed by the crown and given to the Royal Hospital, Greenwich, by Queen Anne.",
111163
'nationality' => ['scotland'],
164+
'ships' => ['blessed_william', 'adventure_galley'],
165+
],
166+
'anne_bonny' => [
167+
'nid' => NULL,
168+
'status' => 1,
169+
'title' => 'Anne Bonny',
170+
'nickname' => ["The Pirate Queen", "Sea's Fury"],
171+
'body' => "",
172+
'nationality' => ['ireland'],
112173
'ships' => ['revenge'],
113174
],
175+
'zheng yi sao' => [
176+
'nid' => NULL,
177+
'status' => 1,
178+
'title' => 'Zheng Yi Sao',
179+
'nickname' => ["The Terror of South China", "Dragon Lady of the Seas"],
180+
'body' => "",
181+
'nationality' => ['china'],
182+
'ships' => ['red_flag_fleet'],
183+
],
184+
'henry_every' => [
185+
'nid' => NULL,
186+
'status' => 1,
187+
'title' => 'Henry Every',
188+
'nickname' => ["Long Ben", "King of Pirates"],
189+
'body' => "",
190+
'nationality' => ['england'],
191+
'ships' => ['fancy'],
192+
],
193+
'charlotte_de_berry' => [
194+
'nid' => NULL,
195+
'status' => 1,
196+
'title' => 'Charlotte de Berry',
197+
'nickname' => ["The Fierce Mistress"],
198+
'body' => "",
199+
'nationality' => ['united_kingdom'],
200+
'ships' => ['queen_anne'],
201+
],
202+
'mary_read' => [
203+
'nid' => NULL,
204+
'status' => 1,
205+
'title' => 'Mary Read',
206+
'nickname' => ["Mark Read"],
207+
'body' => "",
208+
'nationality' => ['united_kingdom'],
209+
'ships' => ['revenge'],
210+
],
211+
'calico_jack' => [
212+
'nid' => NULL,
213+
'status' => 1,
214+
'title' => 'Calico Jack',
215+
'nickname' => [],
216+
'body' => "",
217+
'nationality' => ['jamaica'],
218+
'ships' => ['ranger'],
219+
],
220+
'francois_lolonnais' => [
221+
'nid' => NULL,
222+
'status' => 1,
223+
'title' => 'Francois l\'Olonnais',
224+
'nickname' => ["The Bane of Spain"],
225+
'body' => "",
226+
'nationality' => ['france'],
227+
'ships' => ['la_trompeuse'],
228+
],
229+
'grace_omalley' => [
230+
'nid' => NULL,
231+
'status' => 1,
232+
'title' => 'Grace O\'Malley',
233+
'nickname' => ["Granuaile"],
234+
'body' => "",
235+
'nationality' => ['ireland'],
236+
'ships' => ['pirate_queen'],
237+
],
238+
'' => [
239+
'nid' => NULL,
240+
'status' => 1,
241+
'title' => '',
242+
'nickname' => ["", ""],
243+
'body' => "",
244+
'nationality' => [''],
245+
'ships' => [''],
246+
],
247+
'' => [
248+
'nid' => NULL,
249+
'status' => 1,
250+
'title' => '',
251+
'nickname' => ["", ""],
252+
'body' => "",
253+
'nationality' => [''],
254+
'ships' => [''],
255+
],
256+
'' => [
257+
'nid' => NULL,
258+
'status' => 1,
259+
'title' => '',
260+
'nickname' => ["", ""],
261+
'body' => "",
262+
'nationality' => [''],
263+
'ships' => [''],
264+
],
265+
'' => [
266+
'nid' => NULL,
267+
'status' => 1,
268+
'title' => '',
269+
'nickname' => ["", ""],
270+
'body' => "",
271+
'nationality' => [''],
272+
'ships' => [''],
273+
],
274+
'' => [
275+
'nid' => NULL,
276+
'status' => 1,
277+
'title' => '',
278+
'nickname' => ["", ""],
279+
'body' => "",
280+
'nationality' => [''],
281+
'ships' => [''],
282+
],
114283
];
115284
}

modules/bc_api_example/config/optional/field.storage.node.field_nickname.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ settings:
1313
case_sensitive: false
1414
module: core
1515
locked: false
16-
cardinality: 1
16+
cardinality: -1
1717
translatable: true
1818
indexes: { }
1919
persist_with_no_fields: false

0 commit comments

Comments
 (0)