<?php

namespace Modules\Admin\Config\Gds\Pccs;

class View_Options extends \App\Mvc\View_Window_PaginatedListing_OptionsAbstract
{

    /**
     * {@inheritDoc}
     * @see \App\Mvc\View_Window_PaginatedListing_OptionsAbstract::populateDefinedOptions()
     */
    public function populateDefinedOptions(\App\Mvc\View\Utils\RowOptions\Container\Simple $options)
    {
        $options
            //insert
            ->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("insert")
                ->setDescription($this->lang['index']['options']['description']['insert'])
                ->setIcon('add')
                ->setSection('global')
                ->setAction('insert')
                ->setDimensions(650, 400)
            )
            //reset
            ->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create('reset')
                ->setDescription($this->lang['index']['options']['description']['reset'])
                ->setIcon('reset')
                ->setSection('global')
                ->setJsCallback("MVC.listing.installedHandlers.listing.resetWithConfirmation(this);")
            )
            //save
            ->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("save")
                ->setDescription($this->lang['index']['options']['description']['save'])
                ->setIcon('save')
                ->setSection('global')
                ->setJsCallback("MVC.listing.installedHandlers.listing.saveWithConfirmation(this);")
            )
            ->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create('virtualPayments')
            	->setDescription($this->lang['index']['options']['description']['virtualPayments'])
            	->setIcon('settings')
            	->setModule('Modules/Admin/Config/Gds/Pccs/VirtualPayments')
            	->setAction('index')
            	->addParamFromJs('id', "MVC.listing.installedHandlers.listing.getItemId(this)")
            	->setDimensions(1000, 800)

            )
            //update
	        ->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("update")
	        	->setDescription($this->lang['index']['options']['description']['update'])
	        	->setIcon('edit')
	        	->setAction('update')
	        	->setDimensions(650, 400)
	        	->setKeyForCurrentRow('id')
        	)
        	//delete
            ->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("delete")
                ->setDescription($this->lang['index']['options']['description']['delete'])
                ->setIcon('delete')
                ->setJsCallback("MVC.listing.installedHandlers.listing.deleteCurrentItemWithConfirmation(this);")
            )
            ->append(\App\Mvc\View\Utils\RowOptions\Option\DeleteSelected::create("bulkDelete")
                ->setDescription($this->lang['index']['options']['description']['bulkDelete'])
                )
        ;
    }


}