Backup of db before drupal security update
[yaffs-website] / web / core / modules / serialization / serialization.module
1 <?php
2
3 /**
4  * @file
5  * Provides a service for (de)serializing data to/from formats such as JSON and XML.
6  */
7
8 use Drupal\Core\Routing\RouteMatchInterface;
9
10 /**
11  * Implements hook_help().
12  */
13 function serialization_help($route_name, RouteMatchInterface $route_match) {
14   switch ($route_name) {
15     case 'help.page.serialization':
16       $output = '';
17       $output .= '<h3>' . t('About') . '</h3>';
18       $output .= '<p>' . t('The Serialization module provides a service for serializing and deserializing data to and from formats such as JSON and XML.') . '</p>';
19       $output .= '<p>' . t('Serialization is the process of converting data structures like arrays and objects into a string. This allows the data to be represented in a way that is easy to exchange and store (for example, for transmission over the Internet or for storage in a local file system). These representations can then be deserialized to get back to the original data structures.') . '</p>';
20       $output .= '<p>' . t('The serializer splits this process into two parts. Normalization converts an object to a normalized array structure. Encoding takes that array and converts it to a string.') . '</p>';
21       $output .= '<p>' . t('This module does not have a user interface. It is used by other modules which need to serialize data, such as <a href=":rest">REST</a>.', [':rest' => (\Drupal::moduleHandler()->moduleExists('rest')) ? \Drupal::url('help.page', ['name' => 'rest']) : '#']) . '</p>';
22       $output .= '<p>' . t('For more information, see the <a href=":doc_url">online documentation for the Serialization module</a>.', [':doc_url' => 'https://www.drupal.org/documentation/modules/serialization']) . '</p>';
23       return $output;
24   }
25 }