private function MappedObjectController::getMappedObjects in Salesforce Suite 8.4
Same name and namespace in other branches
- 5.0.x 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\ControllerCode
private function getMappedObjects(EntityInterface $entity) {
// @TODO this probably belongs in a service
return $this
->entityTypeManager()
->getStorage('salesforce_mapped_object')
->loadByEntity($entity);
}