<?php

namespace ThurData\Servers\KerioEmail\Core\UI\Widget\CategoryMenu;

use \ThurData\Servers\KerioEmail\Core\UI\Widget\Tab;
use \ThurData\Servers\KerioEmail\Core\UI\ResponseTemplates;

/**
 * controler for Tab in DOE Category Page
 *
 * @autor ThurData <info@thurdata.ch>
 */
class ListItemContent extends Tab implements \ThurData\Servers\KerioEmail\Core\UI\Interfaces\AjaxElementInterface
{
    public $category = null;

    public function setCategory($category)
    {
        $this->category = $category;
    }
    protected $defaultTemplateName = 'ItemContent';

    public function returnAjaxData()
    {
        return (new ResponseTemplates\HtmlDataJsonResponse($this->getHtml()))->setCallBackFunction($this->callBackFunction)->setRefreshTargetIds($this->refreshActionIds);
    }

    public function initContent()
    {
        //needs to be overwritten
    }

    public function setId($id = null)
    {
        $this->id = 'menuItemContent' . (int) $id;
    }
}
