# Please help me understand Concrete CMS facades

**URL:** <https://forums.concretecms.org/t/please-help-me-understand-concrete-cms-facades/2998>\
**Category:** Developing with Concrete\
**Created:** [May 8, 2022, 7:31am UTC](https://forums.concretecms.org/t/please-help-me-understand-concrete-cms-facades/2998 "2022-05-08T07:31:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![levitte](https://forums.concretecms.org/user_avatar/forums.concretecms.org/levitte/32/2962_2.png) [@levitte](https://forums.concretecms.org/u/levitte)\
**Post date:** [May 8, 2022, 7:31am UTC](https://forums.concretecms.org/t/please-help-me-understand-concrete-cms-facades/2998/1 "2022-05-08T07:31:27Z")

</div>

I know that this is generally deprecated… but it’s still there all over the place in concrete core code, and I’m having a hard time connecting the dots.

So just to take a very concrete (hah!) example, I found the following line in …/src/User/RegistrationService.php:

```php
            $type = $this->application->make('manager/notification/types')->driver('user_signup');

```

I’ve tried to figure out what `$this->application->make('manager/notification/types')` returns, i.e. what files defines the class of the instance it returns. Unfortunately, I haven’t been able to find it. Reading up on Laravel hasn’t helped much, unfortunately.

I have an ulterior motif, of course. I plan to put together code for an invitation function, integrated into the core code if possible, or as a package… but I don’t feel like I have enough of an understanding of the registration process to be able to do a good enough job.

Please help?

Cheers,  
Richard

---

<div class="post-metadata">

**Author:** ![Parasek](https://forums.concretecms.org/user_avatar/forums.concretecms.org/parasek/32/6277_2.png) [@Parasek](https://forums.concretecms.org/u/Parasek)\
**Post date:** [May 8, 2022, 9:00am UTC](https://forums.concretecms.org/t/please-help-me-understand-concrete-cms-facades/2998/2 "2022-05-08T09:00:51Z")

</div>

`$this->application` (usually it’s `$this->app` or `$app`) is a **Service container** created during application startup.

Service container is an object that allows you to easily load different classes (they are all called **Services** ).  
Instead full class path, you can often use short abbrs like  
`$app->make('manager/notification/types')`

If you don’t have access to Service container, you can always call application facade:

`$app = \Concrete\Core\Support\Facade\Application::getFacadeApplication();`

Go to `concrete/config/app.php` and you will find list of all **Service providers** (these are classes that group similar Services).

Look for line:

`'core_notification' => '\Concrete\Core\Notification\NotificationServiceProvider',`

Now, go to NotificationServiceProvider class and you will find that it registers multiple things among:

```auto
$this->app->singleton(
	'manager/notification/types',
	function ($app) {
		return $app->make('Concrete\Core\Notification\Type\Manager');
	}
);

```

And that’s you class.

---

<div class="post-metadata">

**Author:** ![levitte](https://forums.concretecms.org/user_avatar/forums.concretecms.org/levitte/32/2962_2.png) [@levitte](https://forums.concretecms.org/u/levitte)\
**Post date:** [May 8, 2022, 12:54pm UTC](https://forums.concretecms.org/t/please-help-me-understand-concrete-cms-facades/2998/3 "2022-05-08T12:54:34Z")

</div>

Thank you! `app->singleton` was the missing bit that connects the dots for me.

Cheers,  
Richard
