Skip to content
Snippets Groups Projects
Commit 2d47d7bd authored by Andrey Vitushkin's avatar Andrey Vitushkin
Browse files

Issue #3444203: In the formatter add the link to the Table 9.40. IP Address Functions

parent c2e05d47
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Url;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -80,6 +81,17 @@ final class IpAddressCidrFormatter extends FormatterBase implements ContainerFac
public function settingsForm(array $form, FormStateInterface $form_state): array {
$form = parent::settingsForm($form, $form_state);
$form['link_to_functions'] = [
'#type' => 'link',
'#title' => $this->t('IP Address Functions'),
'#url' => Url::fromUri('https://www.postgresql.org/docs/16/functions-net.html'),
'#attributes' => [
'target' => '_blank',
],
'#prefix' => '<div>',
'#sufix' => '</div>',
];
$form['abbrev'] = [
'#type' => 'checkbox',
'#title' => 'abbrev',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment