public function DefaultPattern::getBlockAddUrl in Panels 8.3
Same name and namespace in other branches
- 8.4 src/Plugin/PanelsPattern/DefaultPattern.php \Drupal\panels\Plugin\PanelsPattern\DefaultPattern::getBlockAddUrl()
Gets the block add url.
Parameters
string $tempstore_id: The tempstore identifier.
string $machine_name: The tempstore key.
string $block_id: The id of the block plugin to create.
string $region: The region in which to place the block after it is created.
string $destination: The destination to which to redirect after submission.
Return value
Overrides PanelsPatternInterface::getBlockAddUrl
File
- src/
Plugin/ PanelsPattern/ DefaultPattern.php, line 96
Class
- DefaultPattern
- Plugin annotation @PanelsPattern("default");
Namespace
Drupal\panels\Plugin\PanelsPatternCode
public function getBlockAddUrl($tempstore_id, $machine_name, $block_id, $region = NULL, $destination = NULL) {
return Url::fromRoute('panels.add_block', [
'tempstore_id' => $tempstore_id,
'machine_name' => $machine_name,
'block_id' => $block_id,
'region' => $region,
'destination' => $destination,
]);
}