My beer compendium
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
3.3 KiB

  1. <?php
  2. return [
  3. /*
  4. spec columns
  5. */
  6. 'columns' => [
  7. 'alpha' => [
  8. 'rows' => ['description', 'email', 'name', 'slug'],
  9. 'class' => 'fa fa-sort-alpha',
  10. ],
  11. 'amount' => [
  12. 'rows' => ['amount', 'price'],
  13. 'class' => 'fa fa-sort-amount',
  14. ],
  15. 'numeric' => [
  16. 'rows' => ['created_at', 'updated_at', 'level', 'id', 'phone_number'],
  17. 'class' => 'fa fa-sort-numeric',
  18. ],
  19. ],
  20. /*
  21. whether icons should be enabled
  22. */
  23. 'enable_icons' => true,
  24. /*
  25. defines icon set to use when sorted data is none above (alpha nor amount nor numeric)
  26. */
  27. 'default_icon_set' => 'fa fa-sort',
  28. /*
  29. icon that shows when generating sortable link while column is not sorted
  30. */
  31. 'sortable_icon' => 'fa fa-sort',
  32. /*
  33. generated icon is clickable non-clickable (default)
  34. */
  35. 'clickable_icon' => false,
  36. /*
  37. icon and text separator (any string)
  38. in case of 'clickable_icon' => true; separator creates possibility to style icon and anchor-text properly
  39. */
  40. 'icon_text_separator' => ' ',
  41. /*
  42. suffix class that is appended when ascending direction is applied
  43. */
  44. 'asc_suffix' => '-asc',
  45. /*
  46. suffix class that is appended when descending direction is applied
  47. */
  48. 'desc_suffix' => '-desc',
  49. /*
  50. default anchor class, if value is null none is added
  51. */
  52. 'anchor_class' => null,
  53. /*
  54. default active anchor class, if value is null none is added
  55. */
  56. 'active_anchor_class' => null,
  57. /*
  58. default sort direction anchor class, if value is null none is added
  59. */
  60. 'direction_anchor_class_prefix' => null,
  61. /*
  62. relation - column separator ex: detail.phone_number means relation "detail" and column "phone_number"
  63. */
  64. 'uri_relation_column_separator' => '.',
  65. /*
  66. formatting function applied to name of column, use null to turn formatting off
  67. */
  68. 'formatting_function' => 'ucfirst',
  69. /*
  70. apply formatting function to custom titles as well as column names
  71. */
  72. 'format_custom_titles' => true,
  73. /*
  74. inject title parameter in query strings, use null to turn injection off
  75. example: 'inject_title' => 't' will result in ..user/?t="formatted title of sorted column"
  76. */
  77. 'inject_title_as' => null,
  78. /*
  79. allow request modification, when default sorting is set but is not in URI (first load)
  80. */
  81. 'allow_request_modification' => true,
  82. /*
  83. default direction for: $user->sortable('id') usage
  84. */
  85. 'default_direction' => 'asc',
  86. /*
  87. default direction for non-sorted columns
  88. */
  89. 'default_direction_unsorted' => 'asc',
  90. /*
  91. use the first defined sortable column (Model::$sortable) as default
  92. also applies if sorting parameters are invalid for example: 'sort' => 'name', 'direction' => ''
  93. */
  94. 'default_first_column' => false,
  95. /*
  96. join type: join vs leftJoin (default leftJoin)
  97. for more information see https://github.com/Kyslik/column-sortable/issues/59
  98. */
  99. 'join_type' => 'leftJoin',
  100. ];