You are here

private function MappedObjectController::getMappedObjects in Salesforce Suite 5.0.x

Same name and namespace in other branches
  1. 8.4 modules/salesforce_mapping_ui/src/Controller/MappedObjectController.php \Drupal\salesforce_mapping_ui\Controller\MappedObjectController::getMappedObjects()

Helper function to fetch existing MappedObject or create a new one.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to be mapped.

Return value

\Drupal\salesforce_mapping\Entity\MappedObject[] The Mapped Objects corresponding to the given entity.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

1 call to MappedObjectController::getMappedObjects()
MappedObjectController::listing in modules/salesforce_mapping_ui/src/Controller/MappedObjectController.php
List mapped objects for the entity along the current route.

File

modules/salesforce_mapping_ui/src/Controller/MappedObjectController.php, line 81

Class

MappedObjectController
Returns responses for devel module routes.

Namespace

Drupal\salesforce_mapping_ui\Controller

Code

private function getMappedObjects(EntityInterface $entity) {

  // @TODO this probably belongs in a service
  return $this
    ->entityTypeManager()
    ->getStorage('salesforce_mapped_object')
    ->loadByEntity($entity);
}