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.

1 call to _statistics_link()
_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 176
Logs and displays content 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);
}