CoreFiles by mySites.guru
menuitem.php22 lines, 514 bytes, from Joomla_4.2.0-rc1-Release_Candidate-Full_Package.zip
Raw History Compare with 4.1.5-rc2
md5
f32e8a285318d08897579c8427e3ce6d
sha1
e39d1ef298623daded0b0c95f6bc795b5c1e50c2
sha256
4504f58badc5d1eb9afc85f6bbdb1cc18d18374c464e2a113179e29c6e73a5c8
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Menuitem
 *
 * @copyright   (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

$value = $field->value;

if ($value == '') {
    return;
}

$url   = \Joomla\CMS\Router\Route::_("index.php?Itemid={$value}");
$title = \Joomla\CMS\Factory::getApplication()->getMenu()->getItem($value)->title;

echo "<a href=\"{$url}\">{$title}</a>";

No other release has this exact content. See every version of this file.