diff --git a/src/Charcoal/Ui/AbstractUiItem.php b/src/Charcoal/Ui/AbstractUiItem.php index 72126f20..58ecf38a 100644 --- a/src/Charcoal/Ui/AbstractUiItem.php +++ b/src/Charcoal/Ui/AbstractUiItem.php @@ -78,6 +78,8 @@ public function __construct(array $data = null) public function setDependencies(Container $container) { $this->setTranslator($container['translator']); + $this->setAuthenticator($container['authenticator']); + $this->setAuthorizer($container['authorizer']); } /** diff --git a/src/Charcoal/Ui/ServiceProvider/UiServiceProvider.php b/src/Charcoal/Ui/ServiceProvider/UiServiceProvider.php index 6def1d5a..b57af04f 100644 --- a/src/Charcoal/Ui/ServiceProvider/UiServiceProvider.php +++ b/src/Charcoal/Ui/ServiceProvider/UiServiceProvider.php @@ -2,13 +2,18 @@ namespace Charcoal\Ui\ServiceProvider; -use \Pimple\Container; -use \Pimple\ServiceProviderInterface; +// From Pimple +use Pimple\Container; +use Pimple\ServiceProviderInterface; -use \Charcoal\Ui\ServiceProvider\DashboardServiceProvider; -use \Charcoal\Ui\ServiceProvider\FormServiceProvider; -use \Charcoal\Ui\ServiceProvider\LayoutServiceProvider; -use \Charcoal\Ui\ServiceProvider\MenuServiceProvider; +// From 'charcoal-user' +use Charcoal\User\ServiceProvider\AuthServiceProvider; + +// From 'charcoal-ui' +use Charcoal\Ui\ServiceProvider\DashboardServiceProvider; +use Charcoal\Ui\ServiceProvider\FormServiceProvider; +use Charcoal\Ui\ServiceProvider\LayoutServiceProvider; +use Charcoal\Ui\ServiceProvider\MenuServiceProvider; /** * @@ -21,6 +26,7 @@ class UiServiceProvider implements ServiceProviderInterface */ public function register(Container $container) { + $container->register(new AuthServiceProvider()); $container->register(new DashboardServiceProvider()); $container->register(new FormServiceProvider()); $container->register(new LayoutServiceProvider());