Your IP : 216.73.216.240


Current Path : /home/juvelize/saulnois/administrator/components/com_maximenuck/elements/
Upload File :
Current File : /home/juvelize/saulnois/administrator/components/com_maximenuck/elements/maximenucktext.php

<?php

/**
 * @copyright	Copyright (C) 2011-2019 Cedric KEIFLIN alias ced1870
 * https://www.joomlack.fr
 * @license		GNU/GPL
 * */
defined('_JEXEC') or die;

include_once JPATH_ROOT . '/administrator/components/com_maximenuck/helpers/defines.php';

class JFormFieldMaximenucktext extends \Joomla\CMS\Form\Field\TextField {

	/**
	 * The form field type.
	 *
	 * @var    string
	 */
	protected $type = 'maximenucktext';

	protected function getInput() {
		// Initialize some field attributes.
		$icon = $this->element['icon'];
		$suffix = $this->element['suffix'];

		$html = $icon ? '<div class="maximenuck-field-icon" ' . ($suffix ? 'data-has-suffix="1"' : '') . '><img src="' . MAXIMENUCK_MEDIA_URI . '/images/' . $icon . '" style="margin-right:5px;" /></div>' : '<div style="display:inline-block;width:20px;"></div>';

		$html .= parent::getInput();
		if ($suffix)
			$html .= '<span class="maximenuck-field-suffix">' . $suffix . '</span>';
		return $html;
	}

}