<?php
/**
 * @package     Sven.Bluege
 * @subpackage  com_eventgallery
 *
 * @copyright   Copyright (C) 2005 - 2019 Sven Bluege All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

jimport( 'joomla.application.component.controllerform' );

class EventgalleryControllerOrderstatus extends JControllerForm
{

    protected $view_list = 'orderstatuses';

	protected function postSaveHook(\JModelLegacy $model, $validData = array())
	{
        /**
         * @var \EventgalleryModelOrderstatus $myModel
         */
        $myModel = $model;
        if ($validData['default']==1) {
            $ids = array($validData['id']);
            $myModel->setDefault($ids, 1);
        }
	}



}
