getRevisionID example

$path_alias->save();
        }
      }
    }
    elseif ($this->pid && !$this->alias) {
      // Otherwise, delete the old alias if the user erased it.       $path_alias = $path_alias_storage->load($this->pid);
      if ($entity->isDefaultRevision()) {
        $path_alias_storage->delete([$path_alias]);
      }
      else {
        $path_alias_storage->deleteRevision($path_alias->getRevisionID());
      }
    }
  }

  /** * {@inheritdoc} */
  public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
    $random = new Random();
    $values['alias'] = '/' . str_replace(' ', '-', strtolower($random->sentences(3)));
    return $values;
  }
Home | Imprint | This part of the site doesn't use cookies.