link.module

Defines simple link field types. File core/modules/link/link.module Functions Name Description link_help Implements hook_help(). link_theme Implements hook_theme(). template_preprocess_link_formatter_link_separate Prepares variables for separated link field templates.

link-formatter-link-separate.html.twig

Default theme implementation of a link with separate title and URL elements. Available variables: link: The link that has already been formatted by l(). title: (optional) A descriptive or alternate title for the link, which may be different than the actual link text. See also template_preprocess() template_preprocess_link_formatter_link_separate() File core/modules/link/templates/link-formatter-link-separate.html.twig Related topics Theme system overview Functions and templates for the

Link

Defines an object that holds information about a link. Hierarchy class \Drupal\Core\Link implements RenderableInterface uses LinkGeneratorTrait File core/lib/Drupal/Core/Link.php, line 11 Namespace Drupal\Core Members Name Modifiers Type Description Link::$text protected property The text of the link. Link::$url protected property The URL of the link. Link::createFromRoute public static function Creates a Link object from a given route name and parameters

Link

Provides a link render element. Properties: #title: The link text. #url: \Drupal\Url object containing URL information pointing to a internal or external link . See \Drupal\Core\Utility\LinkGeneratorInterface. Usage example: $build['examples_link'] = [ '#title' => $this->t('Examples'), '#type' => 'link', '#url' => Url::fromRoute('examples.description') ]; Plugin annotation @RenderElement("link") Hierarchy class \Drupal\Component\Plugin\PluginBase implements DerivativeIns

LibraryDiscoveryParser::__construct

public LibraryDiscoveryParser::__construct($root, ModuleHandlerInterface $module_handler, ThemeManagerInterface $theme_manager) Constructs a new LibraryDiscoveryParser instance. Parameters string $root: The app root. \Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler. \Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The theme manager. File core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php, line 51 Class LibraryDiscoveryParser Parses library files

LibraryDiscoveryParser::setOverrideValue

protected LibraryDiscoveryParser::setOverrideValue(array &$library, array $sub_key, array $overrides, $theme_path) Overrides the specified library asset. Parameters array $library: The containing library definition. array $sub_key: An array containing the sub-keys specifying the library asset, e.g. php['js'] or php['css', 'component'] array $overrides: Specifies the overrides, this is an array where the key is the asset to be overridden while the value is overriding asset. File core/lib/

LibraryDiscoveryParser::resolveThemeAssetPath

protected LibraryDiscoveryParser::resolveThemeAssetPath($theme_path, $overriding_asset) Ensures that a full path is returned for an overriding theme asset. Parameters string $theme_path: The theme or base theme. string $overriding_asset: The overriding library asset. Return value string A fully resolved theme asset path relative to the Drupal directory. File core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php, line 453 Class LibraryDiscoveryParser Parses library files to get extension

LibraryDiscoveryParser::parseLibraryInfo

protected LibraryDiscoveryParser::parseLibraryInfo($extension, $path) Parses a given library file and allows modules and themes to alter it. This method sets the parsed information onto the library property. Library information is parsed from *.libraries.yml files; see editor.library.yml for an example. Every library must have at least one js or css entry. Each entry starts with a machine name and defines the following elements: js: A list of JavaScript files to include. Each file is keyed by

LibraryDiscoveryParser::isValidUri

protected LibraryDiscoveryParser::isValidUri($string) Determines if the supplied string is a valid URI. File core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php, line 403 Class LibraryDiscoveryParser Parses library files to get extension data. Namespace Drupal\Core\Asset Code protected function isValidUri($string) { return count(explode('://', $string)) === 2; }

LibraryDiscoveryParser::fileValidUri

protected LibraryDiscoveryParser::fileValidUri($source) Wraps file_valid_uri(). File core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php, line 396 Class LibraryDiscoveryParser Parses library files to get extension data. Namespace Drupal\Core\Asset Code protected function fileValidUri($source) { return file_valid_uri($source); }