<?php

namespace App\Cells;

use App\Cells\CommonCell;

class MylogCell extends CommonCell
{

  public function __construct()
  {
    parent::__construct(service('mylogservice'));
  }

  public function dashboard(array $params): string
  {
    $this->getService()->getActionForm()->form_init_process(__FUNCTION__);
    $this->getService()->setLimit(20);
    $template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
    return view('cells/mylog/' . $template, [
      'myLogCellDatas' => [
        'helper' => $this->getService()->getHelper(),
        'formFilters' => $this->getService()->getActionForm()->getFormFilters(),
        'formOptions' => $this->getService()->getActionForm()->getFormOptions(),
        'entities' => $this->getService()->getEntities(),
      ]
    ]);
  }
}
