public function LinkBinding::build in Drupal 7 to 8/9 Module Upgrader 8
Builds the link definition.
Return value
array
3 calls to LinkBinding::build()
- LocalActionLinkBinding::build in src/
Routing/ LinkBinding/ LocalActionLinkBinding.php - Builds the link definition.
- LocalTaskLinkBinding::build in src/
Routing/ LinkBinding/ LocalTaskLinkBinding.php - Builds the link definition.
- MenuLinkBinding::build in src/
Routing/ LinkBinding/ MenuLinkBinding.php - Builds the link definition.
3 methods override LinkBinding::build()
- LocalActionLinkBinding::build in src/
Routing/ LinkBinding/ LocalActionLinkBinding.php - Builds the link definition.
- LocalTaskLinkBinding::build in src/
Routing/ LinkBinding/ LocalTaskLinkBinding.php - Builds the link definition.
- MenuLinkBinding::build in src/
Routing/ LinkBinding/ MenuLinkBinding.php - Builds the link definition.
File
- src/
Routing/ LinkBinding/ LinkBinding.php, line 91
Class
- LinkBinding
- Represents a binding between a Drupal 7 route and a Drupal 8 one.
Namespace
Drupal\drupalmoduleupgrader\Routing\LinkBindingCode
public function build() {
$link = [
'route_name' => $this
->getDestination()
->getIdentifier(),
];
$source = $this
->getSource();
if ($source
->containsKey('title')) {
$link['title'] = $source['title'];
}
if ($source
->containsKey('weight')) {
$link['weight'] = $source['weight'];
}
return $link;
}