Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 851 Bytes

File metadata and controls

31 lines (21 loc) · 851 Bytes

Primary Key requirement


go back to Table of contents

1. Usage

This option allows you to specify primary key requirements to make admingenerator routes less greedy.

2. Support

Primary Key requirement supports Doctrine ORM, Doctrine ODM and Propel.

3. Example

Usage for the default Entity Manager

generator:            admingenerator.generator.doctrine
params:
  model:              Acme\GalleryBundle\Entity\Album
  pk_requirement:     \d+

Will add a \d+ requirement to these paths:

  • edit path /{pk}/edit
  • update path /{pk}/update
  • show path /{pk}/show}
  • object action path /{pk}/{action}