modchunk.map.inc.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <?php
  2. /**
  3. * @package modx
  4. * @subpackage sqlsrv
  5. */
  6. $xpdo_meta_map['modChunk']= array (
  7. 'package' => 'modx',
  8. 'version' => '1.1',
  9. 'table' => 'site_htmlsnippets',
  10. 'extends' => 'modElement',
  11. 'fields' =>
  12. array (
  13. 'name' => '',
  14. 'description' => 'Chunk',
  15. 'editor_type' => 0,
  16. 'category' => 0,
  17. 'cache_type' => 0,
  18. 'snippet' => NULL,
  19. 'locked' => 0,
  20. 'properties' => NULL,
  21. 'static' => 0,
  22. 'static_file' => '',
  23. ),
  24. 'fieldMeta' =>
  25. array (
  26. 'name' =>
  27. array (
  28. 'dbtype' => 'nvarchar',
  29. 'precision' => '50',
  30. 'phptype' => 'string',
  31. 'null' => false,
  32. 'default' => '',
  33. 'index' => 'unique',
  34. ),
  35. 'description' =>
  36. array (
  37. 'dbtype' => 'nvarchar',
  38. 'precision' => '255',
  39. 'phptype' => 'string',
  40. 'null' => false,
  41. 'default' => 'Chunk',
  42. ),
  43. 'editor_type' =>
  44. array (
  45. 'dbtype' => 'int',
  46. 'phptype' => 'integer',
  47. 'null' => false,
  48. 'default' => 0,
  49. ),
  50. 'category' =>
  51. array (
  52. 'dbtype' => 'int',
  53. 'phptype' => 'integer',
  54. 'null' => false,
  55. 'default' => 0,
  56. 'index' => 'fk',
  57. ),
  58. 'cache_type' =>
  59. array (
  60. 'dbtype' => 'tinyint',
  61. 'precision' => '1',
  62. 'phptype' => 'integer',
  63. 'null' => false,
  64. 'default' => 0,
  65. ),
  66. 'snippet' =>
  67. array (
  68. 'dbtype' => 'nvarchar',
  69. 'precision' => 'max',
  70. 'phptype' => 'string',
  71. ),
  72. 'locked' =>
  73. array (
  74. 'dbtype' => 'bit',
  75. 'phptype' => 'boolean',
  76. 'null' => false,
  77. 'default' => 0,
  78. 'index' => 'index',
  79. ),
  80. 'properties' =>
  81. array (
  82. 'dbtype' => 'nvarchar',
  83. 'precision' => 'max',
  84. 'phptype' => 'array',
  85. 'null' => true,
  86. ),
  87. 'static' =>
  88. array (
  89. 'dbtype' => 'bit',
  90. 'phptype' => 'boolean',
  91. 'null' => false,
  92. 'default' => 0,
  93. 'index' => 'index',
  94. ),
  95. 'static_file' =>
  96. array (
  97. 'dbtype' => 'nvarchar',
  98. 'precision' => '255',
  99. 'phptype' => 'string',
  100. 'null' => false,
  101. 'default' => '',
  102. ),
  103. ),
  104. 'fieldAliases' =>
  105. array (
  106. 'content' => 'snippet',
  107. ),
  108. 'indexes' =>
  109. array (
  110. 'name' =>
  111. array (
  112. 'alias' => 'name',
  113. 'primary' => false,
  114. 'unique' => true,
  115. 'type' => 'BTREE',
  116. 'columns' =>
  117. array (
  118. 'name' =>
  119. array (
  120. 'length' => '',
  121. 'collation' => 'A',
  122. 'null' => false,
  123. ),
  124. ),
  125. ),
  126. 'category' =>
  127. array (
  128. 'alias' => 'category',
  129. 'primary' => false,
  130. 'unique' => false,
  131. 'type' => 'BTREE',
  132. 'columns' =>
  133. array (
  134. 'category' =>
  135. array (
  136. 'length' => '',
  137. 'collation' => 'A',
  138. 'null' => false,
  139. ),
  140. ),
  141. ),
  142. 'locked' =>
  143. array (
  144. 'alias' => 'locked',
  145. 'primary' => false,
  146. 'unique' => false,
  147. 'type' => 'BTREE',
  148. 'columns' =>
  149. array (
  150. 'locked' =>
  151. array (
  152. 'length' => '',
  153. 'collation' => 'A',
  154. 'null' => false,
  155. ),
  156. ),
  157. ),
  158. 'static' =>
  159. array (
  160. 'alias' => 'static',
  161. 'primary' => false,
  162. 'unique' => false,
  163. 'type' => 'BTREE',
  164. 'columns' =>
  165. array (
  166. 'static' =>
  167. array (
  168. 'length' => '',
  169. 'collation' => 'A',
  170. 'null' => false,
  171. ),
  172. ),
  173. ),
  174. ),
  175. 'composites' =>
  176. array (
  177. 'PropertySets' =>
  178. array (
  179. 'class' => 'modElementPropertySet',
  180. 'local' => 'id',
  181. 'foreign' => 'element',
  182. 'owner' => 'local',
  183. 'cardinality' => 'many',
  184. 'criteria' =>
  185. array (
  186. 'foreign' =>
  187. array (
  188. 'element_class' => 'modChunk',
  189. ),
  190. ),
  191. ),
  192. ),
  193. 'aggregates' =>
  194. array (
  195. 'Category' =>
  196. array (
  197. 'class' => 'modCategory',
  198. 'key' => 'id',
  199. 'local' => 'category',
  200. 'foreign' => 'id',
  201. 'cardinality' => 'one',
  202. 'owner' => 'foreign',
  203. ),
  204. ),
  205. 'validation' =>
  206. array (
  207. 'rules' =>
  208. array (
  209. 'name' =>
  210. array (
  211. 'invalid' =>
  212. array (
  213. 'type' => 'preg_match',
  214. 'rule' => '/^(?!\\s)[a-zA-Z0-9\\x2d-\\x2f\\x7f-\\xff-_\\s]+(?!\\s)$/',
  215. 'message' => 'chunk_err_invalid_name',
  216. ),
  217. ),
  218. ),
  219. ),
  220. );