fb3c20d334ca0ff83c1da9dfadf33254.yaml.php 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. return [
  3. '@class' => 'Grav\\Common\\File\\CompiledYamlFile',
  4. 'filename' => '/mnt/data/Sites/hehe.net/user/plugins/admin/blueprints/admin/pages/new.yaml',
  5. 'modified' => 1533014916,
  6. 'data' => [
  7. 'rules' => [
  8. 'slug' => [
  9. 'pattern' => '[a-zA-Zа-яA-Я0-9_\\-]+',
  10. 'min' => 1,
  11. 'max' => 200
  12. ]
  13. ],
  14. 'form' => [
  15. 'validation' => 'loose',
  16. 'fields' => [
  17. 'section' => [
  18. 'type' => 'section',
  19. 'title' => 'PLUGIN_ADMIN.ADD_PAGE'
  20. ],
  21. 'title' => [
  22. 'type' => 'text',
  23. 'label' => 'PLUGIN_ADMIN.PAGE_TITLE',
  24. 'help' => 'PLUGIN_ADMIN.PAGE_TITLE_HELP',
  25. 'validate' => [
  26. 'required' => true
  27. ]
  28. ],
  29. 'folder' => [
  30. 'type' => 'text',
  31. 'label' => 'PLUGIN_ADMIN.FOLDER_NAME',
  32. 'help' => 'PLUGIN_ADMIN.FOLDER_NAME_HELP',
  33. 'validate' => [
  34. 'rule' => 'slug',
  35. 'required' => true
  36. ]
  37. ],
  38. 'route' => [
  39. 'type' => 'parents',
  40. 'label' => 'PLUGIN_ADMIN.PARENT_PAGE',
  41. 'classes' => 'fancy',
  42. 'validate' => [
  43. 'required' => true
  44. ]
  45. ],
  46. 'name' => [
  47. 'type' => 'select',
  48. 'classes' => 'fancy',
  49. 'label' => 'PLUGIN_ADMIN.PAGE_FILE',
  50. 'help' => 'PLUGIN_ADMIN.PAGE_FILE_HELP',
  51. 'data-options@' => '\\Grav\\Plugin\\AdminPlugin::pagesTypes',
  52. 'data-default@' => '\\Grav\\Plugin\\Admin\\Admin::getLastPageName',
  53. 'validate' => [
  54. 'required' => true
  55. ]
  56. ],
  57. 'visible' => [
  58. 'type' => 'toggle',
  59. 'label' => 'PLUGIN_ADMIN.VISIBLE',
  60. 'help' => 'PLUGIN_ADMIN.VISIBLE_HELP',
  61. 'highlight' => '',
  62. 'default' => '',
  63. 'options' => [
  64. '' => 'Auto',
  65. 1 => 'PLUGIN_ADMIN.YES',
  66. 0 => 'PLUGIN_ADMIN.NO'
  67. ],
  68. 'validate' => [
  69. 'type' => 'bool',
  70. 'required' => true
  71. ]
  72. ],
  73. 'blueprint' => [
  74. 'type' => 'blueprint'
  75. ]
  76. ]
  77. ]
  78. ]
  79. ];