modtemplatevar.map.inc.php 6.8 KB

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