Commit d3f54978 authored by alexpott's avatar alexpott

Issue #2318753 by greenhodge, amitgoyal, Devin Carlson: REST Module: Fix...

Issue #2318753 by greenhodge, amitgoyal, Devin Carlson: REST Module: Fix documentation that refers to enabling/disabling of modules
parent 68621729
# Enable all methods on nodes.
# You must enable Hal and Basic_auth modules for this to work. Also, if you are
# You must install Hal and Basic_auth modules for this to work. Also, if you are
# going to use Basic_auth in a production environment then you should consider
# setting up SSL.
# There are alternatives to Basic_auth in contrib such as OAuth module.
......
......@@ -18,8 +18,8 @@ function rest_help($route_name, RouteMatchInterface $route_match) {
$output .= '<p>' . t('The RESTful Web Services module provides a framework for exposing REST resources on your site. It provides support for content entities (see the <a href="!entity">Entity module help page</a> for more information about entities) such as content, users, taxonomy terms, etc.; REST support for content items of the Node module is enabled by default, and support for other types of content entities can be enabled. Other modules may add support for other types of REST resources. For more information, see the <a href="!rest">online documentation for the RESTful Web Services module</a>.', array('!rest' => 'https://drupal.org/documentation/modules/rest', '!entity' => \Drupal::url('help.page', array('name' => 'entity')))) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Enabling supporting modules') . '</dt>';
$output .= '<dd>' . t('In order to use REST on a web site, you need to install and enable modules that provide serialization and authentication services. You can use the Core module <a href="!hal">HAL</a> for serialization and <a href="!basic_auth">HTTP Basic Authentication</a> for authentication, or install a contributed or custom module.', array('!hal' => (\Drupal::moduleHandler()->moduleExists('hal')) ? \Drupal::url('help.page', array('name' => 'hal')) : '#', '!basic_auth' => (\Drupal::moduleHandler()->moduleExists('basic_auth')) ? \Drupal::url('help.page', array('name' => 'basic_auth')) : '#')) . '</dd>';
$output .= '<dt>' . t('Installing supporting modules') . '</dt>';
$output .= '<dd>' . t('In order to use REST on a web site, you need to install modules that provide serialization and authentication services. You can use the Core module <a href="!hal">HAL</a> for serialization and <a href="!basic_auth">HTTP Basic Authentication</a> for authentication, or install a contributed or custom module.', array('!hal' => (\Drupal::moduleHandler()->moduleExists('hal')) ? \Drupal::url('help.page', array('name' => 'hal')) : '#', '!basic_auth' => (\Drupal::moduleHandler()->moduleExists('basic_auth')) ? \Drupal::url('help.page', array('name' => 'basic_auth')) : '#')) . '</dd>';
$output .= '<dt>' . t('Enabling REST support for an entity type') . '</dt>';
$output .= '<dd>' . t('REST support for content items of the Node module is enabled by default, and support for other types of content entities can be enabled. To enable support, you can use a <a href="!config">process based on configuration editing</a> or the contributed <a href="!restui">Rest UI module</a>.', array('!config' => 'https://drupal.org/documentation/modules/rest', '!restui' => 'https://drupal.org/project/restui')) . '</dd>';
$output .= '<dd>' . t('You will also need to grant anonymous users permission to perform each of the REST operations you want to be available, and set up authentication properly to authorize web requests.') . '</dd>';
......
......@@ -123,8 +123,8 @@ public function getDerivativeDefinitions($base_plugin_definition) {
}
catch (RouteNotFoundException $e) {
// If the route does not exist it means we are in a brittle state
// of module enabling/disabling, so we simply exclude this entity
// type.
// of module installing/uninstalling, so we simply exclude this
// entity type.
unset($this->derivatives[$entity_type_id]);
// Continue with the next entity type;
continue 2;
......
......@@ -17,7 +17,7 @@
class AuthTest extends RESTTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -17,7 +17,7 @@
class CreateTest extends RESTTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -13,7 +13,7 @@
class CsrfTest extends RESTTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -17,7 +17,7 @@
class DeleteTest extends RESTTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -17,7 +17,7 @@
class NodeTest extends RESTTestBase {
/**
* Modules to enable.
* Modules to install.
*
* Ensure that the node resource works with comment module enabled.
*
......
......@@ -44,7 +44,7 @@ abstract class RESTTestBase extends WebTestBase {
protected $defaultAuth;
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -18,7 +18,7 @@
class ReadTest extends RESTTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -17,7 +17,7 @@
class ResourceTest extends RESTTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -18,7 +18,7 @@
class UpdateTest extends RESTTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -25,7 +25,7 @@
class StyleSerializerTest extends PluginTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment