Initial commit
This commit is contained in:
commit
efa5624dab
687 changed files with 162710 additions and 0 deletions
38
kirby/src/Panel/Ui/Item/UserItem.php
Normal file
38
kirby/src/Panel/Ui/Item/UserItem.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace Kirby\Panel\Ui\Item;
|
||||
|
||||
use Kirby\Cms\ModelWithContent;
|
||||
use Kirby\Cms\User;
|
||||
|
||||
/**
|
||||
* @package Kirby Panel
|
||||
* @author Bastian Allgeier <bastian@getkirby.com>
|
||||
* @link https://getkirby.com
|
||||
* @copyright Bastian Allgeier
|
||||
* @license https://getkirby.com/license
|
||||
* @since 5.1.0
|
||||
*/
|
||||
class UserItem extends ModelItem
|
||||
{
|
||||
/**
|
||||
* @var \Kirby\Cms\User
|
||||
*/
|
||||
protected ModelWithContent $model;
|
||||
|
||||
public function __construct(
|
||||
User $user,
|
||||
string|array|false|null $image = [],
|
||||
string|null $info = '{{ user.role.title }}',
|
||||
string|null $layout = null,
|
||||
string|null $text = null,
|
||||
) {
|
||||
parent::__construct(
|
||||
model: $user,
|
||||
image: $image,
|
||||
info: $info,
|
||||
layout: $layout,
|
||||
text: $text ?? '{{ user.username }}',
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue