<?php

namespace Modules\Admin\EmailsQueue;

use \App\Mvc\View\Utils\Types\ListingColumn;
use \App\Mvc\View\Utils\Types\ListingColumns;

class View_List extends \App\Mvc\View_Window_PaginatedListing_ListAbstract
{
	/**
	 * Results per page list
	 * @see \App\Mvc\View_Window_PaginatedListing_ListAbstract::$resultsPerPageList
	 */
	protected $resultsPerPageList = [5, 10, 15, 20, 25, 50, 100];

	/**
	 * (non-PHPdoc)
	 * @see \App\Mvc\View_Window_PaginatedListing_ListAbstract::list_getThDetails()
	 */
	protected function list_getThDetails()
	{
		return ListingColumns::create()
			->append(
				ListingColumn::create('subject')
					->setSortable('ASC')
					->setWidth(30)
			)
			->append(
				ListingColumn::create('fromEmail')
			)
			->append(
				ListingColumn::create('to')
			)
			->append(
				ListingColumn::create('status')
					->setSortable('ASC')
					->setWidth(10)
			)
			->append(
				ListingColumn::create('priority')
					->setSortable('ASC')
					->setWidth(5)
			)
			->append(
				ListingColumn::create('category')
					->setSortable('ASC')
			)
			->append(
				ListingColumn::create('sendDatetime')
					->setSortable('ASC')
					->setType('datetime')
			)
			->append(
				ListingColumn::create('id')
					->setSortable('DESC')
			)
			->append(
				ListingColumn::create('lastUpdateTime')
					->setSortable('ASC')
					->setType('datetime')
			)
		->loadLabels($this->lang['index']['listCols'])
		->loadSettings($this->input['listingParams']->getDynamicColumnsSettings());
	}
}