<?php

/**
 * Created by PhpStorm.
 * User: ondra
 * Date: 6.12.17
 * Time: 10:43.
 */

namespace KupShop\OrderingBundle\View;

use KupShop\KupShopBundle\Views\Traits\RequestTrait;
use KupShop\KupShopBundle\Views\View;

class PaymentRedirectView extends View
{
    use RequestTrait;

    protected $template = 'ordering.redirect.tpl';

    protected string $smartyFallback = 'blank';

    protected $url;

    protected $orderUrl;

    protected $order;

    public function getBodyVariables()
    {
        $vars = parent::getBodyVariables();

        $vars['order'] = $this->order;
        $vars['orderSent'] = true;

        return $vars;
    }

    public function getTitle()
    {
        return translate('redirect_title', 'payment');
    }

    public function getUrl()
    {
        return $this->url;
    }

    public function getOrderUrl()
    {
        return $this->orderUrl;
    }

    /**
     * @return $this
     */
    public function setOrder($order)
    {
        $this->order = $order;

        return $this;
    }

    /**
     * @return $this
     */
    public function setOrderUrl($orderUrl)
    {
        $this->orderUrl = $orderUrl;

        return $this;
    }

    /**
     * @return $this
     */
    public function setUrl($url)
    {
        $this->url = $url;

        return $this;
    }
}
