66use Statikbe \FilamentFlexibleContentBlockPages \Models \Page ;
77use Statikbe \FilamentFlexibleContentBlockPages \Models \Redirect ;
88use Statikbe \FilamentFlexibleContentBlockPages \Models \Settings ;
9+ use Statikbe \FilamentFlexibleContentBlockPages \Models \Tag ;
10+ use Statikbe \FilamentFlexibleContentBlockPages \Models \TagType ;
911use Statikbe \FilamentFlexibleContentBlockPages \Routes \Contracts \HandlesPageRoutes ;
1012use Statikbe \FilamentFlexibleContentBlockPages \Routes \LocalisedPageRouteHelper ;
1113use Statikbe \FilamentFlexibleContentBlocks \FilamentFlexibleContentBlocksServiceProvider ;
@@ -20,19 +22,32 @@ class FilamentFlexibleContentBlockPagesConfig
2022
2123 const TYPE_AUTHOR = 'authors ' ;
2224
25+ const TYPE_TAG = 'tags ' ;
26+
27+ const TYPE_TAG_TYPE = 'tag_types ' ;
28+
29+ const TYPE_TAGGABLE = 'taggables ' ;
30+
2331 private string $ pageModel ;
2432
2533 private string $ redirectModel ;
2634
2735 private string $ settingsModel ;
2836
37+ private string $ tagModel ;
38+
39+ private string $ tagTypeModel ;
40+
2941 private HandlesPageRoutes $ routeHelper ;
3042
3143 public function __construct ()
3244 {
33- $ this ->pageModel = $ this ->packageConfig ('models.page ' , Page::class);
34- $ this ->redirectModel = $ this ->packageConfig ('models.redirect ' , Redirect::class);
35- $ this ->settingsModel = $ this ->packageConfig ('models.settings ' , Settings::class);
45+ $ this ->pageModel = $ this ->packageConfig ('models. ' .static ::TYPE_PAGE , Page::class);
46+ $ this ->redirectModel = $ this ->packageConfig ('models. ' .static ::TYPE_REDIRECT , Redirect::class);
47+ $ this ->settingsModel = $ this ->packageConfig ('models. ' .static ::TYPE_SETTINGS , Settings::class);
48+ $ this ->tagModel = $ this ->packageConfig ('models. ' .static ::TYPE_TAG , Tag::class);
49+ $ this ->tagTypeModel = $ this ->packageConfig ('models. ' .static ::TYPE_TAG_TYPE , TagType::class);
50+
3651 }
3752
3853 public function getSupportedLocales (): array
@@ -58,24 +73,49 @@ public function getSettingsModel(): Settings
5873 return app ($ this ->settingsModel );
5974 }
6075
76+ public function getTagModel (): Tag
77+ {
78+ return app ($ this ->tagModel );
79+ }
80+
81+ public function getTagTypeModel (): TagType
82+ {
83+ return app ($ this ->tagTypeModel );
84+ }
85+
6186 public function getAuthorsTable (): string
6287 {
63- return $ this ->packageConfig ('table_names.authors ' , 'users ' );
88+ return $ this ->packageConfig ('table_names. ' . static :: TYPE_AUTHOR , 'users ' );
6489 }
6590
6691 public function getPagesTable (): string
6792 {
68- return $ this ->packageConfig ('table_names.pages ' , 'pages ' );
93+ return $ this ->packageConfig ('table_names. ' . static :: TYPE_PAGE , 'pages ' );
6994 }
7095
7196 public function getRedirectsTable (): string
7297 {
73- return $ this ->packageConfig ('table_names.redirects ' , 'redirects ' );
98+ return $ this ->packageConfig ('table_names. ' . static :: TYPE_REDIRECT , 'redirects ' );
7499 }
75100
76101 public function getSettingsTable (): string
77102 {
78- return $ this ->packageConfig ('table_names.settings ' , 'settings ' );
103+ return $ this ->packageConfig ('table_names. ' .static ::TYPE_SETTINGS , 'settings ' );
104+ }
105+
106+ public function getTagsTable (): string
107+ {
108+ return $ this ->packageConfig ('table_names. ' .static ::TYPE_TAG , 'tags ' );
109+ }
110+
111+ public function getTagTypesTable (): string
112+ {
113+ return $ this ->packageConfig ('table_names. ' .static ::TYPE_TAG_TYPE , 'tag_types ' );
114+ }
115+
116+ public function getTaggablesTable (): string
117+ {
118+ return $ this ->packageConfig ('table_names. ' .static ::TYPE_TAGGABLE , 'taggables ' );
79119 }
80120
81121 /**
0 commit comments