function iframe_help in Iframe 8
Same name and namespace in other branches
- 8.2 iframe.module \iframe_help()
- 7 iframe.module \iframe_help()
Implements hook_help().
File
- ./
iframe.module, line 43 - Defines an iframe field with all attributes.
Code
function iframe_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.iframe':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Iframe module allows you to create fields that contain iframe URLs and iframe title text. See the <a href=":field">Field module help</a> and the <a href=":field_ui">Field UI help</a> pages for general information on fields and how to create and manage them. For more information, see the <a href=":iframe_documentation">online documentation for the Link module</a>.', [
':field' => Url::fromRoute('help.page', [
'name' => 'field',
])
->toString(),
':field_ui' => \Drupal::moduleHandler()
->moduleExists('field_ui') ? Url::fromRoute('help.page', [
'name' => 'field_ui',
])
->toString() : '#',
':iframe_documentation' => 'https://www.drupal.org/documentation/modules/iframe',
]) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Managing and displaying iframe fields') . '</dt>';
$output .= '<dd>' . t('The <em>settings</em> and the <em>display</em> of the iframe field can be configured separately. See the <a href=":field_ui">Field UI help</a> for more information on how to manage fields and their display.', [
':field_ui' => \Drupal::moduleHandler()
->moduleExists('field_ui') ? Url::fromRoute('help.page', [
'name' => 'field_ui',
])
->toString() : '#',
]) . '</dd>';
$output .= '<dt>' . t('Adding attributes to iframes') . '</dt>';
$output .= '<dd>' . t('You can add attributes to iframes, by changing the <em>Format settings</em> in the <em>Manage display</em> page. Further definable are attributes for styling the iframe, like: URL, width, height, title, class, frameborder, scrolling and transparency.') . '</dd>';
$output .= '<dt>' . t('Validating URLs') . '</dt>';
$output .= '<dd>' . t('All URLs are validated after a iframe field is filled in. They can include anchors or query strings.') . '</dd>';
$output .= '</dl>';
return $output;
}
}