-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[4.0][webservice][com_installer] "list of installed extensions" webse…
…rvice (#26765)
- Loading branch information
Showing
13 changed files
with
142 additions
and
119 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-10-29.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES | ||
(0, 'plg_webservices_installer', 'plugin', 'installer', 'webservices', 0, 1, 1, 0, '', '{}', 0, NULL, 0, 0); |
2 changes: 2 additions & 0 deletions
2
administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-10-29.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "checked_out", "checked_out_time", "ordering", "state") VALUES | ||
(0, 'plg_webservices_installer', 'plugin', 'installer', 'webservices', 0, 1, 1, 0, '', '{}', 0, NULL, 0, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
; Joomla! Project | ||
; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. | ||
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php | ||
; Note : All ini files need to be saved as UTF-8 | ||
|
||
PLG_WEBSERVICES_INSTALLER="Web Services - Installer" | ||
PLG_WEBSERVICES_INSTALLER_XML_DESCRIPTION="Add installer routes to the API for your website." |
7 changes: 7 additions & 0 deletions
7
administrator/language/en-GB/plg_webservices_installer.sys.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
; Joomla! Project | ||
; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. | ||
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php | ||
; Note : All ini files need to be saved as UTF-8 | ||
|
||
PLG_WEBSERVICES_INSTALLER="Web Services - Installer" | ||
PLG_WEBSERVICES_INSTALLER_XML_DESCRIPTION="Add installer routes to the API for your website." |
106 changes: 0 additions & 106 deletions
106
api/components/com_installer/src/Controller/LanguagesController.php
This file was deleted.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
api/components/com_installer/src/Controller/ManageController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/** | ||
* @package Joomla.API | ||
* @subpackage com_installer | ||
* | ||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
namespace Joomla\Component\Installer\Api\Controller; | ||
|
||
\defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\MVC\Controller\ApiController; | ||
|
||
/** | ||
* The manage controller | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
class ManageController extends ApiController | ||
{ | ||
/** | ||
* The content type of the item. | ||
* | ||
* @var string | ||
* @since 4.0.0 | ||
*/ | ||
protected $contentType = 'manage'; | ||
|
||
/** | ||
* The default view for the display method. | ||
* | ||
* @var string | ||
* @since __DEPLOY_VERSION__ | ||
*/ | ||
protected $default_view = 'manage'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Plugin | ||
* @subpackage Webservices.Installer | ||
* | ||
* @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; | ||
use Joomla\Router\Route; | ||
|
||
/** | ||
* Web Services adapter for com_installer. | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
class PlgWebservicesInstaller extends CMSPlugin | ||
{ | ||
/** | ||
* Load the language file on instantiation. | ||
* | ||
* @var boolean | ||
* @since 4.0.0 | ||
*/ | ||
protected $autoloadLanguage = true; | ||
|
||
/** | ||
* Registers com_installer's API's routes in the application | ||
* | ||
* @param ApiRouter &$router The API Routing object | ||
* | ||
* @return void | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
public function onBeforeApiRoute(&$router) | ||
{ | ||
$defaults = ['component' => 'com_installer', 'public' => false]; | ||
|
||
$routes = [ | ||
new Route(['GET'], 'v1/installer/manage', 'manage.displayList', [], $defaults) | ||
]; | ||
|
||
$router->addRoutes($routes); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<extension version="4.0" type="plugin" group="webservices" method="upgrade"> | ||
<name>plg_webservices_installer</name> | ||
<author>Joomla! Project</author> | ||
<creationDate>October 2019</creationDate> | ||
<copyright>(C) 2005 - 2019 Open Source Matters. All rights reserved.</copyright> | ||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license> | ||
<authorEmail>admin@joomla.org</authorEmail> | ||
<authorUrl>www.joomla.org</authorUrl> | ||
<version>4.0.0</version> | ||
<description>PLG_WEBSERVICES_INSTALLER_XML_DESCRIPTION</description> | ||
<files> | ||
<filename plugin="installer">installer.php</filename> | ||
</files> | ||
<languages> | ||
<language tag="en-GB">language/en-GB/plg_webservices_installer.ini</language> | ||
<language tag="en-GB">language/en-GB/plg_webservices_installer.sys.ini</language> | ||
</languages> | ||
</extension> |