Skip to content

Commit 392d4da

Browse files
committed
Remove cp_icon config option
1 parent 3cc15f6 commit 392d4da

File tree

4 files changed

+0
-43
lines changed

4 files changed

+0
-43
lines changed

docs/control-panel.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,6 @@ Technically, you can’t fully disable Runway’s CP feature. However, what you
2323
],
2424
```
2525

26-
## Custom Icon for CP Nav Item
27-
28-
Runway has a rather generic icon for resources in the Control Panel Nav. Feel free to change this to something else that better suits your use case (in fact, I’d encourage it).
29-
30-
You can either provide the name of an existing icon [packaged into Statamic Core](https://github.com/statamic/cms/tree/3.1/resources/svg) or inline the SVG as a string.
31-
32-
```php
33-
// config/runway.php
34-
35-
'resources' => [
36-
\App\Models\Order::class => [
37-
'name' => 'Orders',
38-
'cp_icon' => 'date',
39-
],
40-
],
41-
```
42-
4326
## Permissions
4427

4528
![Screenshot of Runway's User Permissions](/img/runway/cp-user-permissions.png)

docs/resources.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,6 @@ If you’d like to hide the CP Nav Item that’s registered for this model, just
7979

8080
> Bear in mind, this will just hide the Nav Item for the CP interface, it won’t actually get rid of the routes being registered. If someone knows where to look, they could still use the CP to manage your models (they could guess the URL).
8181
82-
### Control Panel Icon
83-
84-
You should set `icon` to the name of the icon you’d like to use instead.
85-
86-
Alternatively, if the icon you want isn’t [included in Statamic](https://github.com/statamic/cms/tree/3.1/resources/svg), you can also pass an inline SVG.
87-
88-
```php
89-
'resources' => [
90-
\App\Models\Order::class => [
91-
'name' => 'Orders',
92-
'cp_icon' => 'date',
93-
],
94-
],
95-
```
96-
9782
### Route
9883

9984
If you want to take advantage of Runway’s front-end routing abilities, you can pass in a `route` to enable it.

src/Resource.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,6 @@ public function config(): Collection
6666
return $this->config;
6767
}
6868

69-
public function cpIcon(): string
70-
{
71-
if (! $this->config->has('cp_icon')) {
72-
return File::get(__DIR__.'/../resources/svg/database.svg');
73-
}
74-
75-
return $this->config->get('cp_icon');
76-
}
77-
7869
public function hidden(): bool
7970
{
8071
return $this->config->get('hidden', false);
@@ -290,7 +281,6 @@ public function toArray(): array
290281
'model' => $this->model(),
291282
'name' => $this->name(),
292283
'blueprint' => $this->blueprint(),
293-
'cp_icon' => $this->cpIcon(),
294284
'hidden' => $this->hidden(),
295285
'route' => $this->route(),
296286
'has_publish_states' => $this->hasPublishStates(),

src/ServiceProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ protected function registerNavigation(): self
142142
->each(function (Resource $resource) use (&$nav) {
143143
$nav->create($resource->name())
144144
->section('Content')
145-
->icon($resource->cpIcon())
146145
->route('runway.index', ['resource' => $resource->handle()])
147146
->can('view', $resource);
148147
});

0 commit comments

Comments
 (0)