Skip to content
Snippets Groups Projects

Issue #3308569: Add URL aliases to entities

Merged Sagar Ramgade requested to merge issue/user_manual-3308569:3308569-add-url-aliases into 1.0.x
3 unresolved threads
Files
3
+ 13
0
@@ -234,6 +234,19 @@ class UserManual extends EditorialContentEntityBase {
'weight' => -3,
]);
if (\Drupal::moduleHandler()->moduleExists('path')) {
$fields['path'] = BaseFieldDefinition::create('path')
->setCustomStorage(TRUE)
->setLabel(t('URL alias'))
->setTranslatable(TRUE)
->setComputed(TRUE)
->setDisplayOptions('form', [
'type' => 'path',
'weight' => 100,
])
->setDisplayConfigurable('form', TRUE);
}
$fields['created'] = BaseFieldDefinition::create('created')
->setLabel(t('Created'))
->setDescription(t('The time that the entity was created.'));
Loading