30 lines
651 B
PHP
30 lines
651 B
PHP
<?php
|
|
|
|
namespace App\Cells;
|
|
|
|
use App\Cells\CommonCell;
|
|
|
|
class SearchCell extends CommonCell
|
|
{
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct(service('userservice'));
|
|
}
|
|
|
|
public function client(array $params): string
|
|
{
|
|
$options = ["" => "사용자명 선택"];
|
|
foreach ($this->service->getEntities() as $entity) {
|
|
$options[$entity->getPK()] = $entity->getTitle();
|
|
}
|
|
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
|
return view('cells/search/' . $template, [
|
|
'searchCellDatas' => [
|
|
'options' => $options,
|
|
'selected' => null,
|
|
]
|
|
]);
|
|
}
|
|
}
|