You are here

protected function PathautoFieldItemList::computeValue in Pathauto 8

inheritdoc}

Overrides PathFieldItemList::computeValue

File

src/PathautoFieldItemList.php, line 32

Class

PathautoFieldItemList

Namespace

Drupal\pathauto

Code

protected function computeValue() {
  parent::computeValue();

  // For a new entity, default to creating a new alias.
  if ($this
    ->getEntity()
    ->isNew()) {
    $this->list[0]
      ->set('pathauto', PathautoState::CREATE);
  }
}