comparison core/modules/quickedit/quickedit.module @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 1fec387a4317
children
comparison
equal deleted inserted replaced
17:129ea1e6d783 18:af1871eacc83
9 * 9 *
10 * Technically, this module adds classes and data- attributes to fields and 10 * Technically, this module adds classes and data- attributes to fields and
11 * entities, enabling them for in-place editing. 11 * entities, enabling them for in-place editing.
12 */ 12 */
13 13
14 use Drupal\Core\Url;
14 use Drupal\Core\Entity\ContentEntityInterface; 15 use Drupal\Core\Entity\ContentEntityInterface;
15 use Drupal\Core\Entity\EntityInterface; 16 use Drupal\Core\Entity\EntityInterface;
16 use Drupal\Core\Entity\Display\EntityViewDisplayInterface; 17 use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
17 use Drupal\Core\Routing\RouteMatchInterface; 18 use Drupal\Core\Routing\RouteMatchInterface;
18 19
21 */ 22 */
22 function quickedit_help($route_name, RouteMatchInterface $route_match) { 23 function quickedit_help($route_name, RouteMatchInterface $route_match) {
23 switch ($route_name) { 24 switch ($route_name) {
24 case 'help.page.quickedit': 25 case 'help.page.quickedit':
25 $output = '<h3>' . t('About') . '</h3>'; 26 $output = '<h3>' . t('About') . '</h3>';
26 $output .= '<p>' . t('The Quick Edit module allows users with the <a href=":quickedit_permission">Access in-place editing</a> and <a href=":contextual_permission">Use contextual links</a> permissions to edit field content without visiting a separate page. For more information, see the <a href=":handbook_url">online documentation for the Quick Edit module</a>.', [':handbook_url' => 'https://www.drupal.org/documentation/modules/edit', ':quickedit_permission' => \Drupal::url('user.admin_permissions', [], ['fragment' => 'module-quickedit']), ':contextual_permission' => \Drupal::url('user.admin_permissions', [], ['fragment' => 'module-contextual'])]) . '</p>'; 27 $output .= '<p>' . t('The Quick Edit module allows users with the <a href=":quickedit_permission">Access in-place editing</a> and <a href=":contextual_permission">Use contextual links</a> permissions to edit field content without visiting a separate page. For more information, see the <a href=":handbook_url">online documentation for the Quick Edit module</a>.', [':handbook_url' => 'https://www.drupal.org/documentation/modules/edit', ':quickedit_permission' => Url::fromRoute('user.admin_permissions', [], ['fragment' => 'module-quickedit'])->toString(), ':contextual_permission' => Url::fromRoute('user.admin_permissions', [], ['fragment' => 'module-contextual'])->toString()]) . '</p>';
27 $output .= '<h3>' . t('Uses') . '</h3>'; 28 $output .= '<h3>' . t('Uses') . '</h3>';
28 $output .= '<dl>'; 29 $output .= '<dl>';
29 $output .= '<dt>' . t('Editing content in-place') . '</dt>'; 30 $output .= '<dt>' . t('Editing content in-place') . '</dt>';
30 $output .= '<dd>'; 31 $output .= '<dd>';
31 $output .= '<p>' . t('To edit content in place, you need to activate quick edit mode for a content item. Activate quick edit mode by choosing Quick edit from the contextual links for an area displaying the content (see the <a href=":contextual">Contextual Links module help</a> for more information about how to use contextual links).', [':contextual' => \Drupal::url('help.page', ['name' => 'contextual'])]) . '</p>'; 32 $output .= '<p>' . t('To edit content in place, you need to activate quick edit mode for a content item. Activate quick edit mode by choosing Quick edit from the contextual links for an area displaying the content (see the <a href=":contextual">Contextual Links module help</a> for more information about how to use contextual links).', [':contextual' => Url::fromRoute('help.page', ['name' => 'contextual'])->toString()]) . '</p>';
32 $output .= '<p>' . t('Once quick edit mode is activated, you will be able to edit the individual fields of your content. In the default theme, with a JavaScript-enabled browser and a mouse, the output of different fields in your content is outlined in blue, a pop-up gives the field name as you hover over the field output, and clicking on a field activates the editor. Closing the pop-up window ends quick edit mode.') . '</p>'; 33 $output .= '<p>' . t('Once quick edit mode is activated, you will be able to edit the individual fields of your content. In the default theme, with a JavaScript-enabled browser and a mouse, the output of different fields in your content is outlined in blue, a pop-up gives the field name as you hover over the field output, and clicking on a field activates the editor. Closing the pop-up window ends quick edit mode.') . '</p>';
33 $output .= '</dd>'; 34 $output .= '</dd>';
34 $output .= '</dl>'; 35 $output .= '</dl>';
35 return $output; 36 return $output;
36 } 37 }