aboutsummaryrefslogtreecommitdiffhomepage
path: root/main/app/sprinkles/extend-user/src/ServicesProvider/ServicesProvider.php
diff options
context:
space:
mode:
Diffstat (limited to 'main/app/sprinkles/extend-user/src/ServicesProvider/ServicesProvider.php')
-rwxr-xr-xmain/app/sprinkles/extend-user/src/ServicesProvider/ServicesProvider.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/main/app/sprinkles/extend-user/src/ServicesProvider/ServicesProvider.php b/main/app/sprinkles/extend-user/src/ServicesProvider/ServicesProvider.php
new file mode 100755
index 0000000..8ea3860
--- /dev/null
+++ b/main/app/sprinkles/extend-user/src/ServicesProvider/ServicesProvider.php
@@ -0,0 +1,26 @@
+<?php
+
+// In /app/sprinkles/site/src/ServicesProvider/ServicesProvider.php
+
+namespace UserFrosting\Sprinkle\ExtendUser\ServicesProvider;
+
+class ServicesProvider
+{
+ /**
+ * Register extended user fields services.
+ *
+ * @param Container $container A DI container implementing ArrayAccess and container-interop.
+ */
+ public function register($container)
+ {
+ /**
+ * Extend the 'classMapper' service to register model classes.
+ *
+ * Mappings added: Member
+ */
+ $container->extend('classMapper', function ($classMapper, $c) {
+ $classMapper->setClassMapping('user', 'UserFrosting\Sprinkle\ExtendUser\Database\Models\Member');
+ return $classMapper;
+ });
+ }
+}