25 lines
No EOL
495 B
PHP
25 lines
No EOL
495 B
PHP
<?php
|
|
|
|
|
|
namespace Venom\Helper;
|
|
|
|
|
|
class AdminHelper
|
|
{
|
|
public static function getResponse($content, bool $shouldReload = false, string $component = '', $extra = false)
|
|
{
|
|
$response = [
|
|
'content' => $content,
|
|
'component' => $component
|
|
];
|
|
|
|
if ($shouldReload) {
|
|
$response['reload'] = true;
|
|
}
|
|
if ($extra) {
|
|
$response['extra'] = $extra;
|
|
}
|
|
echo json_encode($response);
|
|
die();
|
|
}
|
|
} |