-
-
Notifications
You must be signed in to change notification settings - Fork 622
Expand file tree
/
Copy pathSlug.php
More file actions
41 lines (38 loc) · 1.34 KB
/
Slug.php
File metadata and controls
41 lines (38 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
namespace Statamic\Fieldtypes;
class Slug extends Text
{
protected $categories = ['special'];
protected $selectableInForms = false;
protected function configFieldItems(): array
{
return [
[
'display' => __('Input Behavior'),
'fields' => [
'generate' => [
'display' => __('Generate'),
'type' => 'toggle',
'instructions' => __('statamic::fieldtypes.slug.config.generate'),
'default' => true,
'width' => 50,
],
'from' => [
'display' => __('From'),
'type' => 'text',
'instructions' => __('statamic::fieldtypes.slug.config.from'),
'default' => 'title',
'width' => 50,
],
'show_regenerate' => [
'display' => __('Show Regenerate Button'),
'type' => 'toggle',
'instructions' => __('statamic::fieldtypes.slug.config.show_regenerate'),
'default' => false,
'width' => 50,
],
],
],
];
}
}