CoreFiles by mySites.guru
PrepareDataEvent.php46 lines, 992 bytes, from Joomla_5.0.0-alpha4-Alpha-Full_Package.zip
Raw History Compare with 5.0.0-alpha3
md5
786c2bb981caa163629dc8bcd116200c
sha1
486949177f27115d2483fcf080389412f89300dc
sha256
85f8009fe6cda73a46beafc8263ace486ff5eed64f17cda14b587ab4178aedf3
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Event\Model;

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

/**
 * Class for Model event.
 * Example:
 *  new PrepareDataEvent('onEventName', ['context' => 'com_example.example', 'subject' => $data]);
 *
 * @since  5.0.0
 */
class PrepareDataEvent extends ModelEvent
{
    /**
     * The argument names, in order expected by legacy plugins.
     *
     * @var array
     *
     * @since  5.0.0
     * @deprecated 5.0 will be removed in 6.0
     */
    protected $legacyArgumentsOrder = ['context', 'subject'];

    /**
     * Getter for the data.
     *
     * @return  object
     *
     * @since  5.0.0
     */
    public function getData()
    {
        return $this->arguments['subject'];
    }
}

The same content is in 2 releases, Joomla 5.0.0-alpha4 to 5.0.0-beta1. See them all, or every version of this file.