modplugin.map.inc.php 3.8 KB

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