public function MappedObject::__construct in Salesforce Suite 8.3
Same name and namespace in other branches
- 8.4 modules/salesforce_mapping/src/Entity/MappedObject.php \Drupal\salesforce_mapping\Entity\MappedObject::__construct()
- 5.0.x modules/salesforce_mapping/src/Entity/MappedObject.php \Drupal\salesforce_mapping\Entity\MappedObject::__construct()
Overrides ContentEntityBase::__construct().
Overrides ContentEntityBase::__construct
File
- modules/
salesforce_mapping/ src/ Entity/ MappedObject.php, line 95
Class
- MappedObject
- Defines a Salesforce Mapped Object entity class.
Namespace
Drupal\salesforce_mapping\EntityCode
public function __construct(array $values) {
// @TODO: Revisit this language stuff
// Drupal adds a layer of abstraction for translation purposes, even though
// we're talking about numeric identifiers that aren't language-dependent
// in any way, so we have to build our own constructor in order to allow
// callers to ignore this layer.
foreach ($values as &$value) {
if (!is_array($value)) {
$value = [
LanguageInterface::LANGCODE_DEFAULT => $value,
];
}
}
parent::__construct($values, 'salesforce_mapped_object');
}