CoreFiles by mySites.guru
MessageStatesField.php47 lines, 1,102 bytes, from Joomla_4.2.9-Stable-Full_Package.zip
Raw History Compare with 4.2.8
md5
3e40723994b130900bd5ebebdfaa3992
sha1
6a934428f143626b42f8869a4fe6b18c02700ba8
sha256
fed5e054dbda08a027bfe35e7710506b21ceb2fa5ee7e41e1cac828bb2fa7ef3
<?php

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

namespace Joomla\Component\Messages\Administrator\Field;

use Joomla\CMS\Form\Field\ListField;
use Joomla\Component\Messages\Administrator\Helper\MessagesHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Message States field.
 *
 * @since  3.6.0
 */
class MessageStatesField extends ListField
{
    /**
     * The form field type.
     *
     * @var     string
     * @since   3.6.0
     */
    protected $type = 'MessageStates';

    /**
     * Method to get the field options.
     *
     * @return  array  The field option objects.
     *
     * @since   3.6.0
     */
    protected function getOptions()
    {
        // Merge state options with any additional options in the XML definition.
        return array_merge(parent::getOptions(), MessagesHelper::getStateOptions());
    }
}

The same content is in 225 releases, Joomla 4.2.1 to 6.2.1-rc1. See them all, or every version of this file.