<?php
namespace TourOperatorProAdmin\app\controllers;
use TourOperatorPro\Mvc\Controller\Controller;
use TourOperatorPro\Mvc\Controller\ControllerForm as ControllerFormAlias;

defined('_TOUROPERATOR_EXEC') or die;
class EmailaccountController extends ControllerFormAlias
{
    public $view = 'emailaccount';
    public function delete($id = 0)
    {
        return parent::delete($id); // TODO: Change the autogenerated stub
    }
    public function save_v1($data = array())
    {
        try {
            $data = parent::save_v1($data); // TODO: Change the autogenerated stub
            if (!empty($data) && isset($data) && is_object($data)) {
                $clientId = is_admin() ? 1 : 0;
                $wordpress = Factory::getWordpress($clientId);
                $this->redirect(Utility::getBackendGoToLink($this->view . ".list"));
                return true;
            }
        }catch (\Exception $e){}
    }

}
