8000 rename method · NativePHP/laravel@8d0ca9d · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d0ca9d

Browse files
committed
rename method
1 parent bd03a50 commit 8d0ca9d

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/Dialog.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,21 +121,9 @@ public function asSheet(string $windowId = null): self
121121
return $this;
122122
}
123123

124-
public function dataArray(): array
125-
{
126-
return [
127-
'title' => $this->title,
128-
'windowReference' => $this->windowReference,
129-
'defaultPath' => $this->defaultPath,
130-
'filters' => $this->filters,
131-
'buttonLabel' => $this->buttonLabel,
132-
'properties' => array_unique($this->properties),
133-
];
134-
}
135-
136124
public function open()
137125
{
138-
$result = $this->client->post('dialog/open', $this->dataArray())->json('result');
126+
$result = $this->client->post('dialog/open', $this->dialogData())->json('result');
139127

140128
if (!in_array('multiSelections', $this->properties)) {
141129
return $result[0] ?? null;
@@ -146,6 +134,18 @@ public function open()
146134

147135
public function save()
148136
{
149-
return $this->client->post('dialog/save', $this->dataArray())->json('result');
137+
return $this->client->post('dialog/save', $this->dialogData())->json('result');
138+
}
139+
140+
public function dialogData(): array
141+
{
142+
return [
143+
'title' => $this->title,
144+
'windowReference' => $this->windowReference,
145+
'defaultPath' => $this->defaultPath,
146+
'filters' => $this->filters,
147+
'buttonLabel' => $this->buttonLabel,
148+
'properties' => array_unique($this->properties),
149+
];
150150
}
151151
}

0 commit comments

Comments
 (0)
0