You are here

public function SalesforceMappableEntityTypes::isMappable in Salesforce Suite 5.0.x

Same name and namespace in other branches
  1. 8.4 modules/salesforce_mapping/src/SalesforceMappableEntityTypes.php \Drupal\salesforce_mapping\SalesforceMappableEntityTypes::isMappable()
  2. 8.3 modules/salesforce_mapping/src/SalesforceMappableEntityTypes.php \Drupal\salesforce_mapping\SalesforceMappableEntityTypes::isMappable()

Given an entity type, return true or false to indicate if it's mappable.

Return value

bool TRUE or FALSE to indicate if the given entity type is mappable.

Overrides SalesforceMappableEntityTypesInterface::isMappable

1 call to SalesforceMappableEntityTypes::isMappable()
SalesforceMappableEntityTypes::getMappableEntityTypes in modules/salesforce_mapping/src/SalesforceMappableEntityTypes.php
Get an array of entity types that are mappable.

File

modules/salesforce_mapping/src/SalesforceMappableEntityTypes.php, line 44

Class

SalesforceMappableEntityTypes
Mappable entity types constructor.

Namespace

Drupal\salesforce_mapping

Code

public function isMappable(EntityTypeInterface $entity_type) {
  if (in_array('Drupal\\Core\\Entity\\ContentEntityTypeInterface', class_implements($entity_type)) && $entity_type
    ->id() != 'salesforce_mapped_object') {
    return TRUE;
  }
  return FALSE;
}