[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/plugins/fields/list/tmpl/ -> list.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Plugin
   5   * @subpackage  Fields.List
   6   *
   7   * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  defined('_JEXEC') or die;
  12  
  13  use Joomla\CMS\Language\Text;
  14  
  15  $fieldValue = $field->value;
  16  
  17  if ($fieldValue == '') {
  18      return;
  19  }
  20  
  21  $fieldValue = (array) $fieldValue;
  22  $texts      = array();
  23  $options    = $this->getOptionsFromField($field);
  24  
  25  foreach ($options as $value => $name) {
  26      if (in_array((string) $value, $fieldValue)) {
  27          $texts[] = Text::_($name);
  28      }
  29  }
  30  
  31  echo htmlentities(implode(', ', $texts));


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer