You are here

public function FlowControllerBase::supportsEntity in CMS Content Sync 2.1.x

Ask this synchronization whether it supports the provided entity. Returns false if either the entity type is not known or the config handler is set to {

Return value

bool

See also

Flow::HANDLER_IGNORE}.

File

src/Controller/FlowControllerBase.php, line 319

Class

FlowControllerBase

Namespace

Drupal\cms_content_sync\Controller

Code

public function supportsEntity(EntityInterface $entity) {
  $config = $this
    ->getEntityTypeConfig($entity
    ->getEntityTypeId(), $entity
    ->bundle());
  if (empty($config) || empty($config['handler'])) {
    return false;
  }
  return Flow::HANDLER_IGNORE != $config['handler'];
}