modplugin.map.inc.php 3.3 KB

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