Skip to content

Commit

Permalink
Adds order|before|after interface to columns and scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
daftspunk committed Feb 23, 2024
1 parent bce9e9e commit b8145a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Element/Filter/ScopeDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
* @method ScopeDefinition cssClass(string $class) cssClass to attach to the scope container
* @method ScopeDefinition emptyOption(string $label) emptyOption label for intentionally selecting an empty value (optional)
* @method ScopeDefinition disabled(bool $value) disabled setting for the scope
* @method ScopeDefinition order(int $order) order number when displaying
* @method ScopeDefinition after(string $after) after places this scope after another existing scope name using the display order (+1)
* @method ScopeDefinition before(string $before) before places this scope before another existing scope name using the display order (-1)
*
* @package october\element
* @author Alexey Bobkov, Samuel Georges
Expand All @@ -34,9 +37,10 @@ class ScopeDefinition extends ElementBase
protected function initDefaultValues()
{
$this
->displayAs('group')
->nameFrom('name')
->disabled(false)
->displayAs('group')
->order(-1)
;
}

Expand Down
2 changes: 2 additions & 0 deletions src/Element/Lists/ColumnDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* @method ColumnDefinition invisible(bool $invisible) invisible is hidden in default list settings
* @method ColumnDefinition clickable(bool $clickable) clickable disables the default click behavior when the column is clicked
* @method ColumnDefinition order(int $order) order number when displaying
* @method ColumnDefinition after(string $after) after places this column after another existing column name using the display order (+1)
* @method ColumnDefinition before(string $before) before places this column before another existing column name using the display order (-1)
*
* @package october\element
* @author Alexey Bobkov, Samuel Georges
Expand Down

0 comments on commit b8145a8

Please sign in to comment.