CoreFiles by mySites.guru
templates.php44 lines, 1,084 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
feb0be6f14b9a3a120fdaf22acedf330
sha1
09b468955b90cb3fa7b155871e196fbb345fc10a
sha256
187f8a6e32957936074fb94524cb1b1dcd658478c2cbf685064b0e68f60d8fda
<?php
/**
 * @package     Joomla.Templates
 * @subpackage  Webservices.Templates
 *
 * @copyright   Copyright (C) 2005 - 2019 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_templates.
 *
 * @since  4.0.0
 */
class PlgWebservicesTemplates extends CMSPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  4.0.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Registers com_templates'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/templates/styles/site', 'styles', ['component' => 'com_templates', 'client_id' => 0]);
		$router->createCRUDRoutes('v1/templates/styles/administrator', 'styles', ['component' => 'com_templates', 'client_id' => 1]);
	}
}

No other release has this exact content. See every version of this file.