Fixes bugs in name edition.
[platal.git] / classes / direnum.php
index 2cd0f41..a8b9a8e 100644 (file)
@@ -30,6 +30,7 @@ class DirEnum
      * being DE_$basename).
      */
     const NAMETYPES      = 'nametypes';
+    const NAMES          = 'names';
 
     const BINETS         = 'binets';
     const GROUPESX       = 'groupesx';
@@ -427,6 +428,18 @@ class DE_NameTypes extends DirEnumeration
 }
 // }}}
 
+// {{{ class DE_Names
+// returns 'system' names ('lastname', 'lastname_marital', ...)
+class DE_Names extends DirEnumeration
+{
+    public $capabilities = 0x005; // self::HAS_OPTIONS | self::SAVE_IN_SESSION;
+
+    protected $from     = 'profile_name_enum';
+    protected $idfield  = 'type';
+    protected $valfield = 'name';
+}
+// }}}
+
 /** GROUPS
  */
 // {{{ class DE_Binets