Skip to content

Commit

Permalink
Amend a7e859d: Fixed AuthAwareInterface
Browse files Browse the repository at this point in the history
Changes:
- Restored ‘authenticator’ and ‘authorizer’ to ‘AbstractUiitem::setDependencies()’;
- Registered ‘\Charcoal\User\AuthServiceProvider’ with ‘UiServiceProvider’;
  • Loading branch information
mcaskill committed Feb 24, 2017
1 parent a7e859d commit 276fd10
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/Charcoal/Ui/AbstractUiItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}

/**
Expand Down
18 changes: 12 additions & 6 deletions src/Charcoal/Ui/ServiceProvider/UiServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
*
Expand All @@ -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());
Expand Down

0 comments on commit 276fd10

Please sign in to comment.