<?php

namespace Leadlion\SolicitaMontaj\Block\Adminhtml\Order\View;

use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Exception\InputException;

class View extends \Magento\Backend\Block\Template
{
    public function __construct(
    \Magento\Sales\Api\OrderRepositoryInterface $orderRepository,
    \Magento\Backend\Block\Template\Context $context,
    array $data = []
    ){
        $this->orderRepository = $orderRepository;
        parent::__construct($context, $data);
    }
    public function showMontaj()
    {
        $id= $this->getRequest()->getParam('order_id');
        try {
            $order = $this->orderRepository->get($id);
        } catch (NoSuchEntityException $e) {
            return false;
        } catch (InputException $e) {
            return false;
        }
        return  $order->getMontaj();
    }
}