Skip to content

Commit 83edd85

Browse files
committed
Standardise events
1 parent fc070a2 commit 83edd85

File tree

3 files changed

+55
-1
lines changed

3 files changed

+55
-1
lines changed

src/Events/MenuBar/MenuBarClicked.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
namespace Native\Laravel\Events\MenuBar;
4+
5+
use Illuminate\Broadcasting\Channel;
6+
use Illuminate\Broadcasting\InteractsWithSockets;
7+
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
8+
use Illuminate\Foundation\Events\Dispatchable;
9+
use Illuminate\Queue\SerializesModels;
10+
11+
class MenuBarClicked implements ShouldBroadcastNow
12+
{
13+
use Dispatchable, InteractsWithSockets, SerializesModels;
14+
15+
public function __construct(public array $combo, public array $bounds, public array $position)
16+
{
17+
}
18+
19+
public function broadcastOn()
20+
{
21+
return [
22+
new Channel('nativephp'),
23+
];
24+
}
25+
}

src/Events/MenuBar/MenuBarContextMenuOpened.php renamed to src/Events/MenuBar/MenuBarDoubleClicked.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88
use Illuminate\Foundation\Events\Dispatchable;
99
use Illuminate\Queue\SerializesModels;
1010

11-
class MenuBarContextMenuOpened implements ShouldBroadcastNow
11+
class MenuBarRightClicked implements ShouldBroadcastNow
1212
{
1313
use Dispatchable, InteractsWithSockets, SerializesModels;
1414

15+
public function __construct(public array $combo, public array $bounds)
16+
{
17+
}
18+
1519
public function broadcastOn()
1620
{
1721
return [
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
namespace Native\Laravel\Events\MenuBar;
4+
5+
use Illuminate\Broadcasting\Channel;
6+
use Illuminate\Broadcasting\InteractsWithSockets;
7+
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
8+
use Illuminate\Foundation\Events\Dispatchable;
9+
use Illuminate\Queue\SerializesModels;
10+
11+
class MenuBarRightClicked implements ShouldBroadcastNow
12+
{
13+
use Dispatchable, InteractsWithSockets, SerializesModels;
14+
15+
public function __construct(public array $combo, public array $bounds)
16+
{
17+
}
18+
19+
public function broadcastOn()
20+
{
21+
return [
22+
new Channel('nativephp'),
23+
];
24+
}
25+
}

0 commit comments

Comments
 (0)