CoreFiles by mySites.guru
media.php29 lines, 705 bytes, from Joomla_4.2.8-Stable-Full_Package.zip
Raw History Compare with 4.2.7
md5
ea2be1ac9b6885328f902e6a950dd180
sha1
9e4f8fe3575af2972f3fbcd1de48c98c26fff192
sha256
93795e153390918635561dd3aa76b1c162a3948fb223a86b661e1f46a303d865
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Media
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

use Joomla\CMS\Layout\LayoutHelper;

if (empty($field->value) || empty($field->value['imagefile']))
{
    return;
}

$class   = $fieldParams->get('image_class');
$options = [
    'src' => $field->value['imagefile'],
    'alt' => empty($field->value['alt_text']) && empty($field->value['alt_empty']) ? false : $field->value['alt_text'],
];

if ($class)
{
    $options['class'] = $class;
}

echo LayoutHelper::render('joomla.html.image', $options);

The same content is in 11 releases, Joomla 4.2.5 to 4.3.0-alpha3. See them all, or every version of this file.