modcontext.map.inc.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <?php
  2. /**
  3. * @package modx
  4. * @subpackage sqlsrv
  5. */
  6. $xpdo_meta_map['modContext']= array (
  7. 'package' => 'modx',
  8. 'version' => '1.1',
  9. 'table' => 'context',
  10. 'extends' => 'modAccessibleObject',
  11. 'fields' =>
  12. array (
  13. 'key' => NULL,
  14. 'name' => NULL,
  15. 'description' => NULL,
  16. 'rank' => 0,
  17. ),
  18. 'fieldMeta' =>
  19. array (
  20. 'key' =>
  21. array (
  22. 'dbtype' => 'nvarchar',
  23. 'precision' => '100',
  24. 'phptype' => 'string',
  25. 'null' => false,
  26. 'index' => 'pk',
  27. ),
  28. 'name' =>
  29. array (
  30. 'dbtype' => 'varchar',
  31. 'precision' => '255',
  32. 'phptype' => 'string',
  33. 'index' => 'index',
  34. ),
  35. 'description' =>
  36. array (
  37. 'dbtype' => 'nvarchar',
  38. 'precision' => '512',
  39. 'phptype' => 'string',
  40. ),
  41. 'rank' =>
  42. array (
  43. 'dbtype' => 'int',
  44. 'precision' => '11',
  45. 'phptype' => 'integer',
  46. 'null' => false,
  47. 'default' => 0,
  48. 'index' => 'index',
  49. ),
  50. ),
  51. 'indexes' =>
  52. array (
  53. 'PRIMARY' =>
  54. array (
  55. 'alias' => 'PRIMARY',
  56. 'primary' => true,
  57. 'unique' => true,
  58. 'type' => 'BTREE',
  59. 'columns' =>
  60. array (
  61. 'key' =>
  62. array (
  63. 'length' => '',
  64. 'collation' => 'A',
  65. 'null' => false,
  66. ),
  67. ),
  68. ),
  69. 'name' =>
  70. array (
  71. 'alias' => 'name',
  72. 'primary' => false,
  73. 'unique' => false,
  74. 'type' => 'BTREE',
  75. 'columns' =>
  76. array (
  77. 'name' =>
  78. array (
  79. 'length' => '',
  80. 'collation' => 'A',
  81. 'null' => false,
  82. ),
  83. ),
  84. ),
  85. 'rank' =>
  86. array (
  87. 'alias' => 'rank',
  88. 'primary' => false,
  89. 'unique' => false,
  90. 'type' => 'BTREE',
  91. 'columns' =>
  92. array (
  93. 'rank' =>
  94. array (
  95. 'length' => '',
  96. 'collation' => 'A',
  97. 'null' => false,
  98. ),
  99. ),
  100. ),
  101. ),
  102. 'composites' =>
  103. array (
  104. 'ContextResources' =>
  105. array (
  106. 'class' => 'modContextResource',
  107. 'local' => 'key',
  108. 'foreign' => 'context_key',
  109. 'cardinality' => 'many',
  110. 'owner' => 'local',
  111. ),
  112. 'ContextSettings' =>
  113. array (
  114. 'class' => 'modContextSetting',
  115. 'local' => 'key',
  116. 'foreign' => 'context_key',
  117. 'cardinality' => 'many',
  118. 'owner' => 'local',
  119. ),
  120. 'Acls' =>
  121. array (
  122. 'class' => 'modAccessContext',
  123. 'local' => 'key',
  124. 'foreign' => 'target',
  125. 'owner' => 'local',
  126. 'cardinality' => 'many',
  127. ),
  128. ),
  129. 'validation' =>
  130. array (
  131. 'rules' =>
  132. array (
  133. 'key' =>
  134. array (
  135. 'key' =>
  136. array (
  137. 'type' => 'preg_match',
  138. 'rule' => '/^[a-zA-Z\\x7f-\\xff][a-zA-Z0-9\\x2d-\\x2f\\x7f-\\xff]*$/',
  139. 'message' => 'context_err_ns_key',
  140. ),
  141. ),
  142. ),
  143. ),
  144. );