Commit 3e148e77 authored by emartoni's avatar emartoni Committed by woprrr

Issue #2960165 by emartoni, Aanal.addweb: Help is missing on module file

parent 09b1221f
......@@ -8,13 +8,13 @@
*/
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\StreamWrapper\PublicStream;
use Drupal\crop\Entity\Crop;
use Drupal\image\Entity\ImageStyle;
use Drupal\media\Entity\MediaType;
use Drupal\media\MediaTypeInterface;
use Drupal\media_entity\MediaBundleInterface;
use Drupal\file\FileInterface;
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_theme().
......@@ -27,6 +27,47 @@ function crop_theme() {
];
}
/**
* Implements hook_help().
*/
function crop_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.crop':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t("<a href=':crop'>Crop</a> provides basic API for image cropping. This module won't do much by itself. Users should pick one of UI modules that utilize this API.</a>",
[
':crop' => 'http://drupal.org/project/crop',
]
) . '</p>';
$output .= '<h3>' . t('Configuration') . '</h3>';
$output .= '<p>' . t('This is API module. In order to crop your images you need a UI module. There are currently two UI modules that use Crop API:') . '</p>';
$output .= '<ul>';
$output .= '<li>' . t('<a href=":image_widget_crop">Image widget crop</a>',
[
':image_widget_crop' => 'https://www.drupal.org/project/image_widget_crop',
]
) . '</li>';
$output .= '<li>' . t('<a href=":focal_point">Focal point</a>',
[
':focal_point' => 'https://www.drupal.org/project/focal_point',
]
) . '</li>';
$output .= '</ul>';
$output .= '<h3>' . t('Technical details') . '</h3>';
$output .= '<p>' . t('Initial discussion can be found on <a href=":manual">manual crop issue queue</a>.',
[
':manual' => 'https://www.drupal.org/node/2368945',
]
) . '</p>';
return $output;
}
}
/**
* Prepares variables for crop_crop summary template.
*
......
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