<?php
/**
 * Webkul Software.
 *
 * @category  Webkul
 * @package   Webkul_Agorae
 * @author    Webkul
 * @copyright Copyright (c) Webkul Software Private Limited (https://webkul.com)
 * @license   https://store.webkul.com/license.html
 */
namespace Webkul\Agorae\Block\View\Element\Html;

/**
 * Agorae Block View Element Html Links
 */
class Links extends \Magento\Framework\View\Element\Html\Links
{
    /**
     * Render block HTML
     *
     * @return string
     */
    protected function _toHtml()
    {
        if (false != $this->getTemplate()) {
            return parent::_toHtml();
        }
        $html = '';
        if ($this->getLinks()) {
            $html = '<div' . ($this->hasCssClass() ? ' class="' . $this->escapeHtml(
                $this->getCssClass()
            ) . '"' : '') . '>';
            $html .= '<div class="block-title"><strong><span>'
                .($this->hasDivClass() ?
                    $this->escapeHtml(
                        $this->getDivClass()
                    ) : __('Company'))
                .'</span></strong></div>';
            $html .= '<ul' . ($this->hasCssClass() ? ' class="' . $this->escapeHtml(
                $this->getCssClass()
            ) . '"' : '') . '>';
            foreach ($this->getLinks() as $link) {
                $html .= $this->renderLink($link);
            }
            $html .= '</ul></div>';
        }
        return $html;
    }
}
