@@ -31,6 +31,7 @@ public function register()
31
31
$ this ->shareWithApp ();
32
32
$ this ->loadConfig ();
33
33
$ this ->registerViews ();
34
+ $ this ->registerAliases ();
34
35
}
35
36
36
37
/**
@@ -66,6 +67,49 @@ protected function registerViews()
66
67
$ this ->app ['view ' ]->addNamespace ('forum ' , __DIR__ .'/../../../views ' );
67
68
}
68
69
70
+ /**
71
+ * Register aliases
72
+ *
73
+ * @return void
74
+ */
75
+ protected function registerAliases ()
76
+ {
77
+ $ aliases = [
78
+ 'ForumPost ' => 'Syntax\Core\Forum\Facades\ForumPost ' ,
79
+ 'Forum ' => 'Syntax\Core\Forum ' ,
80
+ 'Forum_Board ' => 'Syntax\Core\Forum_Board ' ,
81
+ 'Forum_Board_Type ' => 'Syntax\Core\Forum_Board_Type ' ,
82
+ 'Forum_Category ' => 'Syntax\Core\Forum_Category ' ,
83
+ 'Forum_Category_Type ' => 'Syntax\Core\Forum_Category_Type ' ,
84
+ 'Forum_Moderation ' => 'Syntax\Core\Forum_Moderation ' ,
85
+ 'Forum_Moderation_Log ' => 'Syntax\Core\Forum_Moderation_Log ' ,
86
+ 'Forum_Moderation_Reply ' => 'Syntax\Core\Forum_Moderation_Reply ' ,
87
+ 'Forum_View ' => 'Syntax\Core\Forum_View ' ,
88
+ 'Forum_Post ' => 'Syntax\Core\Forum_Post ' ,
89
+ 'Forum_Post_Edit ' => 'Syntax\Core\Forum_Post_Edit ' ,
90
+ 'Forum_Post_Status ' => 'Syntax\Core\Forum_Post_Status ' ,
91
+ 'Forum_Post_Type ' => 'Syntax\Core\Forum_Post_Type ' ,
92
+ 'Forum_Post_View ' => 'Syntax\Core\Forum_Post_View ' ,
93
+ 'Forum_Reply ' => 'Syntax\Core\Forum_Reply ' ,
94
+ 'Forum_Reply_Edit ' => 'Syntax\Core\Forum_Reply_Edit ' ,
95
+ 'Forum_Reply_Roll ' => 'Syntax\Core\Forum_Reply_Roll ' ,
96
+ 'Forum_Reply_Type ' => 'Syntax\Core\Forum_Reply_Type ' ,
97
+ 'Forum_Support_Status ' => 'Syntax\Core\Forum_Support_Status ' ,
98
+ ];
99
+
100
+ $ appAliases = \Config::get ('core::nonCoreAliases ' );
101
+
102
+ foreach ($ aliases as $ alias => $ class ) {
103
+ if (!is_null ($ appAliases )) {
104
+ if (!in_array ($ alias , $ appAliases )) {
105
+ \Illuminate \Foundation \AliasLoader::getInstance ()->alias ($ alias , $ class );
106
+ }
107
+ } else {
108
+ \Illuminate \Foundation \AliasLoader::getInstance ()->alias ($ alias , $ class );
109
+ }
110
+ }
111
+ }
112
+
69
113
/**
70
114
* Get the services provided by the provider.
71
115
*
0 commit comments