<?php
namespace Benhauer\Salesmanago\Block\Adminhtml\Client;

use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;

class CreateLoginButton extends GenericButton implements ButtonProviderInterface
{

    public function getButtonData()
    {
        return [
            'label' => __('Go to Login'),
            'class' => 'reset',
            'on_click' => sprintf("location.href = '%s';", $this->getBackUrl()),
            'sort_order' => 30
        ];
    }

    public function getBackUrl()
    {
        return $this->getUrl('*/*/login');
    }
}
