You are here

class SalesforceMappingController in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 5.0.x modules/salesforce_mapping_ui/src/Controller/SalesforceMappingController.php \Drupal\salesforce_mapping_ui\Controller\SalesforceMappingController

For now, just some dynamic route names.

Hierarchy

Expanded class hierarchy of SalesforceMappingController

File

modules/salesforce_mapping_ui/src/Controller/SalesforceMappingController.php, line 12

Namespace

Drupal\salesforce_mapping_ui\Controller
View source
class SalesforceMappingController extends EntityController {

  /**
   * Provides a callback for a mapping edit page Title.
   *
   * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
   *   The route match.
   * @param \Drupal\Core\Entity\EntityInterface $_entity
   *   (optional) An entity, passed in directly from the request attributes.
   *
   * @return string|null
   *   The title for the mapping edit page, if an entity was found.
   */
  public function editTitle(RouteMatchInterface $route_match, EntityInterface $_entity = NULL) {
    if ($entity = $this
      ->doGetEntity($route_match, $_entity)) {
      return $this
        ->t("%label Mapping Settings", [
        '%label' => $entity
          ->label(),
      ]);
    }
    return $this
      ->t('New Mapping');
  }

  /**
   * Provides a callback for a mapping field config page Title.
   *
   * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
   *   The route match.
   * @param \Drupal\Core\Entity\EntityInterface $_entity
   *   (optional) An entity, passed in directly from the request attributes.
   *
   * @return string|null
   *   The title for the mapping edit page, if an entity was found.
   */
  public function fieldsTitle(RouteMatchInterface $route_match, EntityInterface $_entity = NULL) {
    if ($entity = $this
      ->doGetEntity($route_match, $_entity)) {
      return $this
        ->t("%label Mapping Fields", [
        '%label' => $entity
          ->label(),
      ]);
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityController::$entityRepository protected property The entity repository.
EntityController::$entityTypeBundleInfo protected property The entity type bundle info.
EntityController::$entityTypeManager protected property The entity manager.
EntityController::$renderer protected property The renderer.
EntityController::addBundleTitle public function Provides a generic add title callback for entities with bundles.
EntityController::addPage public function Displays add links for the available bundles.
EntityController::addTitle public function Provides a generic add title callback for an entity type.
EntityController::create public static function Instantiates a new instance of this class. Overrides ContainerInjectionInterface::create
EntityController::deleteTitle public function Provides a generic delete title callback.
EntityController::doGetEntity protected function Determines the entity.
EntityController::loadBundleDescriptions protected function Expands the bundle information with descriptions, if known.
EntityController::redirect protected function Returns a redirect response object for the specified route. Overrides UrlGeneratorTrait::redirect
EntityController::title public function Provides a generic title callback for a single entity.
EntityController::__construct public function Constructs a new EntityController.
SalesforceMappingController::editTitle public function Provides a callback for a mapping edit page Title. Overrides EntityController::editTitle
SalesforceMappingController::fieldsTitle public function Provides a callback for a mapping field config page Title.
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.
UrlGeneratorTrait::$urlGenerator protected property The url generator.
UrlGeneratorTrait::getUrlGenerator Deprecated protected function Returns the URL generator service.
UrlGeneratorTrait::setUrlGenerator Deprecated public function Sets the URL generator service.
UrlGeneratorTrait::url Deprecated protected function Generates a URL or path for a specific route based on the given parameters.