File tree 1 file changed +38
-35
lines changed
1 file changed +38
-35
lines changed Original file line number Diff line number Diff line change 2
2
/**
3
3
* Server Path Field plugin for Craft CMS
4
4
*
5
- * ServerPathField
5
+ * ServerPathField
6
6
*
7
7
* @author Ryan Whitney, Alexander M. Korn
8
8
* @link https://github.com/amkdev
28
28
*/
29
29
class ServerPathField extends Plugin
30
30
{
31
- // Static Properties
32
- // =========================================================================
31
+ // Static Properties
32
+ // =========================================================================
33
33
34
- /**
35
- * @var ServerPathField
36
- */
37
- public static $ plugin ;
34
+ /**
35
+ * @var ServerPathField
36
+ */
37
+ public static $ plugin ;
38
38
39
- // Public Methods
40
- // =========================================================================
39
+ // Public Methods
40
+ // =========================================================================
41
41
42
- /**
43
- * @inheritdoc
44
- */
45
- public function init ()
46
- {
47
- parent ::init ();
48
- self ::$ plugin = $ this ;
42
+ /**
43
+ * @inheritdoc
44
+ */
45
+ public function init ()
46
+ {
49
47
50
- // Register our fields
51
- Event::on (
52
- Fields::class,
53
- Fields::EVENT_REGISTER_FIELD_TYPES ,
54
- function (RegisterComponentTypesEvent $ event ) {
55
- $ event ->types [] = ServerPathFieldType::class;
56
- }
57
- );
48
+ $ this ->controllerNamespace = 'amkdev \\serverpathfield \\fields \\ServerPathFieldType ' ;
58
49
59
- Craft::info (
60
- Craft::t (
61
- 'server-path-field ' ,
62
- '{name} plugin loaded ' ,
63
- ['name ' => $ this ->name ]
64
- ),
65
- __METHOD__
66
- );
67
- }
50
+ parent ::init ();
51
+ self ::$ plugin = $ this ;
68
52
69
- // Protected Methods
70
- // =========================================================================
53
+ // Register our fields
54
+ Event::on (
55
+ Fields::class,
56
+ Fields::EVENT_REGISTER_FIELD_TYPES ,
57
+ function (RegisterComponentTypesEvent $ event ) {
58
+ $ event ->types [] = ServerPathFieldType::class;
59
+ }
60
+ );
61
+
62
+ Craft::info (
63
+ Craft::t (
64
+ 'server-path-field ' ,
65
+ '{name} plugin loaded ' ,
66
+ ['name ' => $ this ->name ]
67
+ ),
68
+ __METHOD__
69
+ );
70
+ }
71
+
72
+ // Protected Methods
73
+ // =========================================================================
71
74
72
75
}
You can’t perform that action at this time.
0 commit comments