link.module

File

core/modules/link/link.module

View source
<?php


/**
 * @file
 */

use Drupal\link\Hook\LinkThemeHooks;

/**
 * Prepares variables for separated link field templates.
 *
 * This template outputs a separate title and link.
 *
 * Default template: link-formatter-link-separate.html.twig.
 *
 * @param array $variables
 *   An associative array containing:
 *   - title: (optional) A descriptive or alternate title for the link, which
 *     may be different than the actual link text.
 *   - url_title: The anchor text for the link.
 *   - url: A \Drupal\Core\Url object.
 *
 * @deprecated in drupal:11.3.0 and is removed from drupal:12.0.0. Initial
 *   template_preprocess functions are registered directly in hook_theme().
 *
 * @see https://www.drupal.org/node/3504125
 */
function template_preprocess_link_formatter_link_separate(&$variables) : void {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.3.0 and is removed from drupal:12.0.0. Initial template_preprocess functions are registered directly in hook_theme(). See https://www.drupal.org/node/3504125', E_USER_DEPRECATED);
  \Drupal::service(LinkThemeHooks::class)->preprocessLinkFormatterLinkSeparate($variables);
}

Functions

Title Deprecated Summary
template_preprocess_link_formatter_link_separate

in drupal:11.3.0 and is removed from drupal:12.0.0. Initial template_preprocess functions are registered directly in hook_theme().

Prepares variables for separated link field templates.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.