Slug

Use the slug type for representing an entity in a URL.

The slug is dynamically generated from another property, but can optionally be set manually.

Recommended doctrine field type: string

Included in the PerformBaseBundle.

Options

label

The label to use for form labels and table headings. If no label is provided, a sensible label will be created automatically.

This option is optional.

Allowed types: string

Defaults:

  • List context: No default
  • View context: No default
  • Create context: No default
  • Edit context: No default

readonly

Set the readonly attribute on the input element.

This option is optional.

Allowed types: boolean

Defaults:

  • List context: false
  • View context: false
  • Create context: false
  • Edit context: false

target

The name of the entity field to generate the slug from, e.g. ‘title’. The field must exist for the current context.

This option is required.

Allowed types: string

Defaults:

  • List context: No default
  • View context: No default
  • Create context: No default
  • Edit context: No default