| Current Path : /var/www/html/administrator/components/com_jchat/Field/ |
| Current File : /var/www/html/administrator/components/com_jchat/Field/VideoField.php |
<?php
namespace JExtstore\Component\JChat\Administrator\Field;
/**
* @package JCHAT::CONFIG::administrator::components::com_jchat
* @subpackage Field
* @author Joomla! Extensions Store
* @copyright (C) 2024 - Joomla! Extensions Store
* @license GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html
*/
defined('_JEXEC') or die;
use Joomla\CMS\Form\FormField;
/**
* @package JCHAT::CONFIG::administrator::components::com_jchat
* @subpackage Field
* @since 1.6
*/
class VideoField extends FormField {
/**
* The form field type.
*
* @var string
*
* @since 1.6
*/
protected $type = 'video';
/**
* Method to get the field markup.
*
* @return string The field input markup.
*
* @since 11.1
*/
protected function getInput()
{
// Initialize some field attributes.
$width = $this->element['width'] ? (int) $this->element['width'] : '420';
$height = $this->element['height'] ? (int) $this->element['height'] : '315';
$src = $this->element['src'];
$class = $this->element['class'];
return '<iframe title="video" class="'.$class.'" width="'.$width.'" height="'.$height.'" src="'.$src.'" frameborder="0" allowfullscreen></iframe>';
}
}