mirror of
https://github.com/flarum/core.git
synced 2025-10-18 10:16:09 +02:00
Move more event classes to appropriate namespaces
This commit is contained in:
41
src/User/Event/AvatarDeleting.php
Normal file
41
src/User/Event/AvatarDeleting.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\User\Event;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
||||
class AvatarDeleting
|
||||
{
|
||||
/**
|
||||
* The user whose avatar will be deleted.
|
||||
*
|
||||
* @var User
|
||||
*/
|
||||
public $user;
|
||||
|
||||
/**
|
||||
* The user performing the action.
|
||||
*
|
||||
* @var User
|
||||
*/
|
||||
public $actor;
|
||||
|
||||
/**
|
||||
* @param User $user The user whose avatar will be deleted.
|
||||
* @param User $actor The user performing the action.
|
||||
*/
|
||||
public function __construct(User $user, User $actor)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->actor = $actor;
|
||||
}
|
||||
}
|
50
src/User/Event/AvatarSaving.php
Normal file
50
src/User/Event/AvatarSaving.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\User\Event;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
||||
class AvatarSaving
|
||||
{
|
||||
/**
|
||||
* The user whose avatar will be saved.
|
||||
*
|
||||
* @var User
|
||||
*/
|
||||
public $user;
|
||||
|
||||
/**
|
||||
* The user performing the action.
|
||||
*
|
||||
* @var User
|
||||
*/
|
||||
public $actor;
|
||||
|
||||
/**
|
||||
* The path to the avatar that will be saved.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $path;
|
||||
|
||||
/**
|
||||
* @param User $user The user whose avatar will be saved.
|
||||
* @param User $actor The user performing the action.
|
||||
* @param string $path The path to the avatar that will be saved.
|
||||
*/
|
||||
public function __construct(User $user, User $actor, $path)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->actor = $actor;
|
||||
$this->path = $path;
|
||||
}
|
||||
}
|
38
src/User/Event/Searching.php
Normal file
38
src/User/Event/Searching.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\User\Event;
|
||||
|
||||
use Flarum\Search\SearchCriteria;
|
||||
use Flarum\User\Search\UserSearch;
|
||||
|
||||
class Searching
|
||||
{
|
||||
/**
|
||||
* @var \Flarum\User\Search\UserSearch
|
||||
*/
|
||||
public $search;
|
||||
|
||||
/**
|
||||
* @var SearchCriteria
|
||||
*/
|
||||
public $criteria;
|
||||
|
||||
/**
|
||||
* @param UserSearch $search
|
||||
* @param SearchCriteria $criteria
|
||||
*/
|
||||
public function __construct(UserSearch $search, SearchCriteria $criteria)
|
||||
{
|
||||
$this->search = $search;
|
||||
$this->criteria = $criteria;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user