class PriceListController in Commerce Pricelist 8.2
Hierarchy
- class \Drupal\commerce_pricelist\Controller\PriceListController uses StringTranslationTrait
Expanded class hierarchy of PriceListController
1 file declares its use of PriceListController
File
- src/
Controller/ PriceListController.php, line 9
Namespace
Drupal\commerce_pricelist\ControllerView source
class PriceListController {
use StringTranslationTrait;
/**
* Provides the title callback for the price list items collection route.
*
* @param \Drupal\Core\Routing\RouteMatchInterface $route_match
* The route match.
*
* @return string
* The title.
*/
public function priceListItemsTitle(RouteMatchInterface $route_match) {
$price_list = $route_match
->getParameter('commerce_pricelist');
assert($price_list instanceof PriceListInterface);
return $this
->t('Prices for %label', [
'%label' => $price_list
->label(),
]);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PriceListController:: |
public | function | Provides the title callback for the price list items collection route. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |