modchunk.map.inc.php 4.4 KB

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