function commerce_pricelist_local_tasks_alter in Commerce Pricelist 8.2
Implements hook_local_tasks_alter().
File
- ./
commerce_pricelist.module, line 142 - Allows defining prices for specific stores, customers, quantities.
Code
function commerce_pricelist_local_tasks_alter(&$local_tasks) {
// This is needed because the "base_route" cannot be guessed by the logic
// in \Drupal\views\Plugin\Derative\ViewsLocalTask::alterLocalTasks().
// Without the following code, the "prices" local task isn't added because
// of the missing "base_route".
if (isset($local_tasks['views_view:view.commerce_product_variation_prices.page'])) {
$local_tasks['views_view:view.commerce_product_variation_prices.page']['base_route'] = 'entity.commerce_product_variation.edit_form';
}
}