You are here

protected function EntityLegalDocumentForm::pathAliasSource in Entity Legal 3.0.x

2 calls to EntityLegalDocumentForm::pathAliasSource()
EntityLegalDocumentForm::pathAlias in src/Form/EntityLegalDocumentForm.php
EntityLegalDocumentForm::savePathAlias in src/Form/EntityLegalDocumentForm.php

File

src/Form/EntityLegalDocumentForm.php, line 347

Class

EntityLegalDocumentForm
Base form for contact form edit forms.

Namespace

Drupal\entity_legal\Form

Code

protected function pathAliasSource() : ?string {
  if ($this->entity
    ->isNew()) {
    return NULL;
  }
  return '/' . $this->entity
    ->toUrl()
    ->getInternalPath();
}