mirror of
https://github.com/flarum/framework.git
synced 2025-04-08 15:50:19 +08:00
53 lines
1.1 KiB
PHP
53 lines
1.1 KiB
PHP
<?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\Core\Command;
|
|
|
|
use Flarum\User\User;
|
|
|
|
class DeletePost
|
|
{
|
|
/**
|
|
* The ID of the post to delete.
|
|
*
|
|
* @var int
|
|
*/
|
|
public $postId;
|
|
|
|
/**
|
|
* The user performing the action.
|
|
*
|
|
* @var User
|
|
*/
|
|
public $actor;
|
|
|
|
/**
|
|
* Any other user input associated with the action. This is unused by
|
|
* default, but may be used by extensions.
|
|
*
|
|
* @var array
|
|
*/
|
|
public $data;
|
|
|
|
/**
|
|
* @param int $postId The ID of the post to delete.
|
|
* @param User $actor The user performing the action.
|
|
* @param array $data Any other user input associated with the action. This
|
|
* is unused by default, but may be used by extensions.
|
|
*/
|
|
public function __construct($postId, User $actor, array $data = [])
|
|
{
|
|
$this->postId = $postId;
|
|
$this->actor = $actor;
|
|
$this->data = $data;
|
|
}
|
|
}
|