CoreFiles by mySites.guru
PrepareContentEvent.php62 lines, 1,295 bytes, from Joomla_5.4.8-Stable-Full_Package.zip
Raw History Compare with 5.4.7
md5
5a01ce5d8ed860d8bc7d9b8ee02eea6c
sha1
96bc3d88447fb1b82887f28e42e6d728bfb5aa3d
sha256
4e6aedf879273dc5b4fa1643c0f3f51584f94d358a5978a12e923b3778edf9f9
<?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\Finder;

use Joomla\Component\Finder\Administrator\Indexer\Result;

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

/**
 * Class for Finder events.
 * Example:
 *  new PrepareContentEvent('onEventName', ['subject' => $item]);
 *
 * @since  5.0.0
 */
class PrepareContentEvent extends AbstractFinderEvent
{
    /**
     * The argument names, in order expected by legacy plugins.
     *
     * @var array
     *
     * @since  5.0.0
     * @deprecated 5.0 will be removed in 7.0
     */
    protected $legacyArgumentsOrder = ['subject'];

    /**
     * Setter for the subject argument.
     *
     * @param   Result  $value  The value to set
     *
     * @return  Result
     *
     * @since  5.0.0
     */
    protected function onSetSubject(Result $value): Result
    {
        return $value;
    }

    /**
     * Getter for the item.
     *
     * @return  Result
     *
     * @since  5.0.0
     */
    public function getItem(): Result
    {
        return $this->arguments['subject'];
    }
}

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