You are here

public function DomainPathautoGenerator::domainPathPathautoGenerationIsEnabled in Domain Path 8

Check if "Generate URL alias" is enabled for entity/domain combination.

Parameters

\Drupal\Core\Entity\EntityInterface $entity:

string $domain_id:

Return value

boolean Return TRUE or FALSE.

File

modules/domain_path_pathauto/src/DomainPathautoGenerator.php, line 163

Class

DomainPathautoGenerator
Provides methods for generating domain path aliases.

Namespace

Drupal\domain_path_pathauto

Code

public function domainPathPathautoGenerationIsEnabled(EntityInterface $entity, $domain_id) {
  $collection = $this
    ->getDomainPathPathautoStateCollection($entity, $domain_id);
  $value = \Drupal::keyValue($collection)
    ->get($entity
    ->id());
  if ($value === NULL) {
    return FALSE;
  }
  return $value;
}