function _statistics_link

Generates a link to a path, truncating the displayed text to a given width.

Parameters

string $path: The path to generate the link for.

int $width: The width to set the displayed text of the path.

Return value

string A string as a link, truncated to the width, linked to the given $path.

3 calls to _statistics_link()
statistics_node_tracker in drupal/core/modules/statistics/statistics.pages.inc
Page callback: Displays statistics for a node.
statistics_top_referrers in drupal/core/modules/statistics/statistics.admin.inc
Page callback: Displays the "top referrers" in the access logs.
_statistics_format_item in drupal/core/modules/statistics/statistics.module
Formats an item for display, including both the item title and the link.

File

drupal/core/modules/statistics/statistics.module, line 390
Logs and displays access statistics for a site.

Code

function _statistics_link($path, $width = 35) {
  $title = drupal_container()
    ->get('path.alias_manager')
    ->getPathAlias($path);
  $title = truncate_utf8($title, $width, FALSE, TRUE);
  return l($title, $path);
}