CoreFiles by mySites.guru
messages.php47 lines, 932 bytes, from Joomla_4.0.0-beta4-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta3
md5
3154b21f39246d488f55daf59ad8b891
sha1
29a2c4e0e282c7a0ee522165f570d626e9cacba2
sha256
019a0be2dd233ae02f6fed823de68d08e733cb9852b60f767a12d429b5999a1a
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Webservices.Messages
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Router\ApiRouter;

/**
 * Web Services adapter for com_messages.
 *
 * @since  4.0.0
 */
class PlgWebservicesMessages extends CMSPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  4.0.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Registers com_messages's API's routes in the application
	 *
	 * @param   ApiRouter  &$router  The API Routing object
	 *
	 * @return  void
	 *
	 * @since   4.0.0
	 */
	public function onBeforeApiRoute(&$router)
	{
		$router->createCRUDRoutes(
			'v1/messages',
			'messages',
			['component' => 'com_messages']
		);
	}
}

The same content is in 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.