vhost/app/Cells/BoardCell.php
2024-05-07 16:45:05 +09:00

29 lines
738 B
PHP

<?php
namespace App\Cells;
use App\Cells\BaseCell;
use App\Models\BoardModel;
class BoardCell extends BaseCell
{
private $_boardModel = null;
private function getBoardModel(): BoardModel
{
return $this->_boardModel = $this->_boardModel ?: new BoardModel();
}
public function information(array $viewDatas): string
{
helper('Board');
$viewDatas['currentCategory'] = $this->getCategoryModel()->getEntity([$this->getCategoryModel()->getPrimaryKey() => __FUNCTION__]);
$viewDatas['cellDatas'] = array();
$viewDatas['cellDatas']['entitys'] = $this->getBoardModel()->getEntitys([
'category_uid' => __FUNCTION__
]);
return view(
'Views/front/board/cell/' . __FUNCTION__,
['viewDatas' => $viewDatas]
);
}
}