<?php

namespace App\Cells\Part;

use App\Services\Part\DISKService;

class DISKCell extends PartCell
{
  public function __construct()
  {
    parent::__construct(service('part_diskservice'));
  }

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