1
0
mirror of https://github.com/flarum/core.git synced 2025-10-18 18:26:07 +02:00

Extract Flarum\Group namespace

This commit is contained in:
Franz Liedke
2017-06-24 14:05:00 +02:00
parent 11bf3e34b7
commit c22219ec20
24 changed files with 69 additions and 71 deletions

View 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\Group\Event;
use Flarum\Group\Group;
use Flarum\User\User;
class Created
{
/**
* @var \Flarum\Group\Group
*/
public $group;
/**
* @var User
*/
public $actor;
/**
* @param Group $group
* @param User $actor
*/
public function __construct(Group $group, User $actor = null)
{
$this->group = $group;
$this->actor = $actor;
}
}

View 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\Group\Event;
use Flarum\Group\Group;
use Flarum\User\User;
class Deleted
{
/**
* @var \Flarum\Group\Group
*/
public $group;
/**
* @var User
*/
public $actor;
/**
* @param \Flarum\Group\Group $group
* @param User $actor
*/
public function __construct(Group $group, User $actor = null)
{
$this->group = $group;
$this->actor = $actor;
}
}

View File

@@ -0,0 +1,51 @@
<?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\Group\Event;
use Flarum\Group\Group;
use Flarum\User\User;
class Deleting
{
/**
* The group that will be deleted.
*
* @var Group
*/
public $group;
/**
* The user who is performing the action.
*
* @var User
*/
public $actor;
/**
* Any user input associated with the command.
*
* @var array
*/
public $data;
/**
* @param Group $group The group that will be deleted.
* @param User $actor The user performing the action.
* @param array $data Any user input associated with the command.
*/
public function __construct(Group $group, User $actor, array $data)
{
$this->group = $group;
$this->actor = $actor;
$this->data = $data;
}
}

View 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\Group\Event;
use Flarum\Group\Group;
use Flarum\User\User;
class Renamed
{
/**
* @var \Flarum\Group\Group
*/
public $group;
/**
* @var User
*/
public $actor;
/**
* @param \Flarum\Group\Group $group
* @param User $actor
*/
public function __construct(Group $group, User $actor = null)
{
$this->group = $group;
$this->actor = $actor;
}
}

View File

@@ -0,0 +1,51 @@
<?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\Group\Event;
use Flarum\Group\Group;
use Flarum\User\User;
class Saving
{
/**
* The group that will be saved.
*
* @var \Flarum\Group\Group
*/
public $group;
/**
* The user who is performing the action.
*
* @var User
*/
public $actor;
/**
* The attributes to update on the group.
*
* @var array
*/
public $data;
/**
* @param Group $group The group that will be saved.
* @param User $actor The user who is performing the action.
* @param array $data The attributes to update on the group.
*/
public function __construct(Group $group, User $actor, array $data)
{
$this->group = $group;
$this->actor = $actor;
$this->data = $data;
}
}