mirror of
https://github.com/flarum/core.git
synced 2025-07-28 12:10:51 +02:00
Update namespaces for beta 8
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Flarum\Statistics\Listener;
|
namespace Flarum\Statistics\Listener;
|
||||||
|
|
||||||
use Flarum\Event\ConfigureWebApp;
|
use Flarum\Frontend\Event\Rendering;
|
||||||
use Illuminate\Contracts\Events\Dispatcher;
|
use Illuminate\Contracts\Events\Dispatcher;
|
||||||
|
|
||||||
class AddClientAssets
|
class AddClientAssets
|
||||||
@@ -21,13 +21,13 @@ class AddClientAssets
|
|||||||
*/
|
*/
|
||||||
public function subscribe(Dispatcher $events)
|
public function subscribe(Dispatcher $events)
|
||||||
{
|
{
|
||||||
$events->listen(ConfigureWebApp::class, [$this, 'addAssets']);
|
$events->listen(Rendering::class, [$this, 'addAssets']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ConfigureClientView $event
|
* @param ConfigureClientView $event
|
||||||
*/
|
*/
|
||||||
public function addAssets(ConfigureWebApp $event)
|
public function addAssets(Rendering $event)
|
||||||
{
|
{
|
||||||
if ($event->isAdmin()) {
|
if ($event->isAdmin()) {
|
||||||
$event->addAssets([
|
$event->addAssets([
|
||||||
|
@@ -13,10 +13,10 @@ namespace Flarum\Statistics\Listener;
|
|||||||
|
|
||||||
use DateTime;
|
use DateTime;
|
||||||
use DateTimeZone;
|
use DateTimeZone;
|
||||||
use Flarum\Core\Discussion;
|
use Flarum\Discussion\Discussion;
|
||||||
use Flarum\Core\Post;
|
use Flarum\Post\Post;
|
||||||
use Flarum\Core\User;
|
use Flarum\User\User;
|
||||||
use Flarum\Event\ConfigureWebApp;
|
use Flarum\Frontend\Event\Rendering;
|
||||||
use Flarum\Settings\SettingsRepositoryInterface;
|
use Flarum\Settings\SettingsRepositoryInterface;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Contracts\Events\Dispatcher;
|
use Illuminate\Contracts\Events\Dispatcher;
|
||||||
@@ -41,13 +41,13 @@ class AddStatisticsData
|
|||||||
*/
|
*/
|
||||||
public function subscribe(Dispatcher $events)
|
public function subscribe(Dispatcher $events)
|
||||||
{
|
{
|
||||||
$events->listen(ConfigureWebApp::class, [$this, 'addStatisticsData']);
|
$events->listen(Rendering::class, [$this, 'addStatisticsData']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ConfigureWebApp $event
|
* @param Rendering $event
|
||||||
*/
|
*/
|
||||||
public function addStatisticsData(ConfigureWebApp $event)
|
public function addStatisticsData(Rendering $event)
|
||||||
{
|
{
|
||||||
if ($event->isAdmin()) {
|
if ($event->isAdmin()) {
|
||||||
$event->view->setVariable('statistics', array_merge(
|
$event->view->setVariable('statistics', array_merge(
|
||||||
|
Reference in New Issue
Block a user