modtemplatevar.map.inc.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <?php
  2. /**
  3. * @package modx
  4. * @subpackage mysql
  5. */
  6. $xpdo_meta_map['modTemplateVar']= array (
  7. 'package' => 'modx',
  8. 'version' => '1.1',
  9. 'table' => 'site_tmplvars',
  10. 'extends' => 'modElement',
  11. 'tableMeta' =>
  12. array (
  13. 'engine' => 'InnoDB',
  14. ),
  15. 'fields' =>
  16. array (
  17. 'type' => '',
  18. 'name' => '',
  19. 'caption' => '',
  20. 'description' => '',
  21. 'editor_type' => 0,
  22. 'category' => 0,
  23. 'locked' => 0,
  24. 'elements' => NULL,
  25. 'rank' => 0,
  26. 'display' => '',
  27. 'default_text' => NULL,
  28. 'properties' => NULL,
  29. 'input_properties' => NULL,
  30. 'output_properties' => NULL,
  31. 'static' => 0,
  32. 'static_file' => '',
  33. ),
  34. 'fieldMeta' =>
  35. array (
  36. 'type' =>
  37. array (
  38. 'dbtype' => 'varchar',
  39. 'precision' => '20',
  40. 'phptype' => 'string',
  41. 'null' => false,
  42. 'default' => '',
  43. ),
  44. 'name' =>
  45. array (
  46. 'dbtype' => 'varchar',
  47. 'precision' => '50',
  48. 'phptype' => 'string',
  49. 'null' => false,
  50. 'default' => '',
  51. 'index' => 'unique',
  52. ),
  53. 'caption' =>
  54. array (
  55. 'dbtype' => 'varchar',
  56. 'precision' => '80',
  57. 'phptype' => 'string',
  58. 'null' => false,
  59. 'default' => '',
  60. ),
  61. 'description' =>
  62. array (
  63. 'dbtype' => 'varchar',
  64. 'precision' => '191',
  65. 'phptype' => 'string',
  66. 'null' => false,
  67. 'default' => '',
  68. ),
  69. 'editor_type' =>
  70. array (
  71. 'dbtype' => 'int',
  72. 'precision' => '11',
  73. 'phptype' => 'integer',
  74. 'null' => false,
  75. 'default' => 0,
  76. ),
  77. 'category' =>
  78. array (
  79. 'dbtype' => 'int',
  80. 'precision' => '11',
  81. 'phptype' => 'integer',
  82. 'null' => false,
  83. 'default' => 0,
  84. 'index' => 'fk',
  85. ),
  86. 'locked' =>
  87. array (
  88. 'dbtype' => 'tinyint',
  89. 'precision' => '1',
  90. 'attributes' => 'unsigned',
  91. 'phptype' => 'boolean',
  92. 'null' => false,
  93. 'default' => 0,
  94. 'index' => 'index',
  95. ),
  96. 'elements' =>
  97. array (
  98. 'dbtype' => 'text',
  99. 'phptype' => 'string',
  100. ),
  101. 'rank' =>
  102. array (
  103. 'dbtype' => 'int',
  104. 'precision' => '11',
  105. 'phptype' => 'integer',
  106. 'null' => false,
  107. 'default' => 0,
  108. 'index' => 'index',
  109. ),
  110. 'display' =>
  111. array (
  112. 'dbtype' => 'varchar',
  113. 'precision' => '20',
  114. 'phptype' => 'string',
  115. 'null' => false,
  116. 'default' => '',
  117. ),
  118. 'default_text' =>
  119. array (
  120. 'dbtype' => 'mediumtext',
  121. 'phptype' => 'string',
  122. ),
  123. 'properties' =>
  124. array (
  125. 'dbtype' => 'text',
  126. 'phptype' => 'array',
  127. 'null' => true,
  128. ),
  129. 'input_properties' =>
  130. array (
  131. 'dbtype' => 'text',
  132. 'phptype' => 'array',
  133. 'null' => true,
  134. ),
  135. 'output_properties' =>
  136. array (
  137. 'dbtype' => 'text',
  138. 'phptype' => 'array',
  139. 'null' => true,
  140. ),
  141. 'static' =>
  142. array (
  143. 'dbtype' => 'tinyint',
  144. 'precision' => '1',
  145. 'attributes' => 'unsigned',
  146. 'phptype' => 'boolean',
  147. 'null' => false,
  148. 'default' => 0,
  149. 'index' => 'index',
  150. ),
  151. 'static_file' =>
  152. array (
  153. 'dbtype' => 'varchar',
  154. 'precision' => '191',
  155. 'phptype' => 'string',
  156. 'null' => false,
  157. 'default' => '',
  158. ),
  159. ),
  160. 'fieldAliases' =>
  161. array (
  162. 'content' => 'default_text',
  163. ),
  164. 'indexes' =>
  165. array (
  166. 'name' =>
  167. array (
  168. 'alias' => 'name',
  169. 'primary' => false,
  170. 'unique' => true,
  171. 'type' => 'BTREE',
  172. 'columns' =>
  173. array (
  174. 'name' =>
  175. array (
  176. 'length' => '',
  177. 'collation' => 'A',
  178. 'null' => false,
  179. ),
  180. ),
  181. ),
  182. 'category' =>
  183. array (
  184. 'alias' => 'category',
  185. 'primary' => false,
  186. 'unique' => false,
  187. 'type' => 'BTREE',
  188. 'columns' =>
  189. array (
  190. 'category' =>
  191. array (
  192. 'length' => '',
  193. 'collation' => 'A',
  194. 'null' => false,
  195. ),
  196. ),
  197. ),
  198. 'locked' =>
  199. array (
  200. 'alias' => 'locked',
  201. 'primary' => false,
  202. 'unique' => false,
  203. 'type' => 'BTREE',
  204. 'columns' =>
  205. array (
  206. 'locked' =>
  207. array (
  208. 'length' => '',
  209. 'collation' => 'A',
  210. 'null' => false,
  211. ),
  212. ),
  213. ),
  214. 'rank' =>
  215. array (
  216. 'alias' => 'rank',
  217. 'primary' => false,
  218. 'unique' => false,
  219. 'type' => 'BTREE',
  220. 'columns' =>
  221. array (
  222. 'rank' =>
  223. array (
  224. 'length' => '',
  225. 'collation' => 'A',
  226. 'null' => false,
  227. ),
  228. ),
  229. ),
  230. 'static' =>
  231. array (
  232. 'alias' => 'static',
  233. 'primary' => false,
  234. 'unique' => false,
  235. 'type' => 'BTREE',
  236. 'columns' =>
  237. array (
  238. 'static' =>
  239. array (
  240. 'length' => '',
  241. 'collation' => 'A',
  242. 'null' => false,
  243. ),
  244. ),
  245. ),
  246. ),
  247. 'composites' =>
  248. array (
  249. 'PropertySets' =>
  250. array (
  251. 'class' => 'modElementPropertySet',
  252. 'local' => 'id',
  253. 'foreign' => 'element',
  254. 'owner' => 'local',
  255. 'cardinality' => 'many',
  256. 'criteria' =>
  257. array (
  258. 'foreign' =>
  259. array (
  260. 'element_class' => 'modTemplateVar',
  261. ),
  262. ),
  263. ),
  264. 'TemplateVarTemplates' =>
  265. array (
  266. 'class' => 'modTemplateVarTemplate',
  267. 'local' => 'id',
  268. 'foreign' => 'tmplvarid',
  269. 'cardinality' => 'many',
  270. 'owner' => 'local',
  271. ),
  272. 'TemplateVarResources' =>
  273. array (
  274. 'class' => 'modTemplateVarResource',
  275. 'local' => 'id',
  276. 'foreign' => 'tmplvarid',
  277. 'cardinality' => 'many',
  278. 'owner' => 'local',
  279. ),
  280. 'TemplateVarResourceGroups' =>
  281. array (
  282. 'class' => 'modTemplateVarResourceGroup',
  283. 'local' => 'id',
  284. 'foreign' => 'tmplvarid',
  285. 'cardinality' => 'many',
  286. 'owner' => 'local',
  287. ),
  288. ),
  289. 'aggregates' =>
  290. array (
  291. 'Category' =>
  292. array (
  293. 'class' => 'modCategory',
  294. 'local' => 'category',
  295. 'foreign' => 'id',
  296. 'cardinality' => 'one',
  297. 'owner' => 'foreign',
  298. ),
  299. ),
  300. 'validation' =>
  301. array (
  302. 'rules' =>
  303. array (
  304. 'name' =>
  305. array (
  306. 'invalid' =>
  307. array (
  308. 'type' => 'preg_match',
  309. 'rule' => '/^(?!\\s)[a-zA-Z0-9\\x2d-\\x2f\\x7f-\\xff-_\\s]+(?!\\s)$/',
  310. 'message' => 'tv_err_invalid_name',
  311. ),
  312. 'reserved' =>
  313. array (
  314. 'type' => 'preg_match',
  315. 'rule' => '/^(?!(id|type|contentType|pagetitle|longtitle|description|alias|link_attributes|published|pub_date|unpub_date|parent|isfolder|introtext|content|richtext|template|menuindex|searchable|cacheable|createdby|createdon|editedby|editedon|deleted|deletedby|deletedon|publishedon|publishedby|menutitle|donthit|privateweb|privatemgr|content_dispo|hidemenu|class_key|context_key|content_type|uri|uri_override|hide_children_in_tree|show_in_tree)$)/',
  316. 'message' => 'tv_err_reserved_name',
  317. ),
  318. ),
  319. ),
  320. ),
  321. );