<?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['cellDatas']['entitys'] = $this->getBoardModel()->getEntitys([
			'category' => __FUNCTION__
		]);
		return view(
			'Views/cells/board/' . __FUNCTION__,
			['viewDatas' => $viewDatas]
		);
	}
}
