You are here

class PriceListController in Commerce Pricelist 8.2

Hierarchy

Expanded class hierarchy of PriceListController

1 file declares its use of PriceListController
PriceListItemRouteProvider.php in src/PriceListItemRouteProvider.php

File

src/Controller/PriceListController.php, line 9

Namespace

Drupal\commerce_pricelist\Controller
View 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

Namesort descending Modifiers Type Description Overrides
PriceListController::priceListItemsTitle public function Provides the title callback for the price list items collection route.
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.