public function MappedObjectStorage::__construct in Salesforce Suite 8.3
MappedObjectStorage constructor.
Parameters
string $entity_type_id: Entity type id.
\Drupal\Core\Database\Connection $database: Database service.
\Drupal\Core\Entity\EntityManagerInterface $entity_manager: Entity manager service.
\Drupal\Core\Cache\CacheBackendInterface $cache: Cache service.
\Drupal\Core\Language\LanguageManagerInterface $language_manager: Language service.
Throws
\Drupal\Component\Plugin\Exception\PluginNotFoundException
Overrides SqlContentEntityStorage::__construct
File
- modules/
salesforce_mapping/ src/ MappedObjectStorage.php, line 41
Class
- MappedObjectStorage
- Class MappedObjectStorage.
Namespace
Drupal\salesforce_mappingCode
public function __construct($entity_type_id, Connection $database, EntityManagerInterface $entity_manager, CacheBackendInterface $cache, LanguageManagerInterface $language_manager) {
// @TODO the $entity_type needs to be in the constructor and not
// devrived from from $entity_type_id. This is because of the parent
// class SqlContentEntityStorage's createInstance method, which while
// ultimately calls it's own constructor through here, is calling this
// constuctor with the same paramter blueprint, which expects
// EntityTypeInterface and not a string.
$entity_type = $entity_manager
->getDefinition($entity_type_id);
parent::__construct($entity_type, $database, $entity_manager, $cache, $language_manager);
}