Skip to content

allow customizing reorder column names #602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion 6.x/crud-operation-reorder.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,20 @@ This operation allows your admins to reorder & nest entries.
<a name="requirements"></a>
## Requirements

Your model should have the following integer fields, with a default value of 0: ```parent_id```, ```lft```, ```rgt```, ```depth```.
Your model should have the following integer fields, with a default value of 0: ```parent_id```, ```lft```, ```rgt```, ```depth```. The names are optional, you can change them in the ```setupReorderOperation()``` method.

```php

protected function setupReorderOperation()
{
CRUD::setOperationSetting('reorderColumnNames', [
'parent_id' => 'custom_parent_id',
'lft' => 'left',
'rgt' => 'right',
'depth' => 'deep',
]);
}
```

Additionally, the `parent_id` field has to be nullable.

Expand Down