From 150b9b00cfe0bc7266e8448c572f28ea7001afa7 Mon Sep 17 00:00:00 2001 From: Yuri Salimovskiy Date: Thu, 5 Jan 2023 14:11:02 +0200 Subject: [PATCH 01/41] let tabs display data in entry manager --- docs/development/fieldtypes/fieldtypes.md | 6 +++++ docs/development/tab-files.md | 30 +++++++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/development/fieldtypes/fieldtypes.md b/docs/development/fieldtypes/fieldtypes.md index 0de4e271b..e9dda73b8 100644 --- a/docs/development/fieldtypes/fieldtypes.md +++ b/docs/development/fieldtypes/fieldtypes.md @@ -219,6 +219,12 @@ Display the field data as column in the Entry Manager | \$entry | `Array` | Current `ChannelEntry` object | | Returns | `String` | The string to display in Entry Manager column | +#### `EE_Fieldtype::getTableColumnConfig()` + +Sets [table column configuration](development/services/table.html#setting-the-columns) for Entry Manager + +Returns `Array` + #### `EE_Fieldtype::validate($data)` Validates the field input diff --git a/docs/development/tab-files.md b/docs/development/tab-files.md index 5ff23ad0e..a2e400bb8 100644 --- a/docs/development/tab-files.md +++ b/docs/development/tab-files.md @@ -17,7 +17,9 @@ lang: php [TOC] ## Overview -Add-ons can also add tabs which are visible on in [Publish Layouts](control-panel/channels.md#publish-layouts). Respectivley these tabs would also be visible on the Entry Publish/Edit page if selected in the publish layout. Two things are required for your add-on to have this functionality: +Add-ons can also add tabs which are visible on in [Publish Layouts](control-panel/channels.md#publish-layouts). Respectivley these tabs would also be visible on the Entry Publish/Edit page if selected in the publish layout. Tabs can also optionally display the associated data as columns in Entry Manager. + +Two things are required for your add-on to have this functionality: - [`tabs()` method](/development/add-on-update-file.md#add-publish-tabs-with-your-add-on-tabs) added to the Update File - The Tab File (`tab.[addon_name].php`) @@ -75,6 +77,13 @@ class Amazing_add_on_tab } + // This function is needed to display data as Entry Manager column + public function renderTableCell($data, $field_id, $entry) + { + $entry_meta = $this->getEntryMeta($entry->entry_id); + return json_encode($entry_meta); + } + } ``` @@ -201,4 +210,21 @@ Called during a `ChannelEntry` entity's `afterSave` event, this allows you to in | \$entry_ids | `array` | Channel ID where the entry is being created or edited | | Returns | `Void` | | -Called during a `ChannelEntry` entity's `beforeDelete` event, this allows you to sync your records if any are tied to channel entry_ids. \ No newline at end of file +Called during a `ChannelEntry` entity's `beforeDelete` event, this allows you to sync your records if any are tied to channel entry_ids. + +### `renderTableCell($data, $field_id, $entry)` + +Display the tab data as column in the Entry Manager + +| Parameter | Type | Description | +| --------- | -------- | ----------------------------------------- | +| \$data | `Array` | Ignored by tab files | +| \$field_id| `Int` | Ignored by tab files | +| \$entry | `Array` | Current `ChannelEntry` object | +| Returns | `String` | The string to display in Entry Manager column | + +#### `getTableColumnConfig()` + +Sets [table column configuration](development/services/table.html#setting-the-columns) for Entry Manager + +Returns `Array` \ No newline at end of file From 04a0bed12b7e8f5a9fe7ae38f0c23c7df3491b71 Mon Sep 17 00:00:00 2001 From: Yuri Salimovskiy Date: Wed, 18 Jan 2023 15:48:35 +0200 Subject: [PATCH 02/41] search module docs --- docs/add-ons/search/advanced.md | 59 ++++++++++++++++++++++++++++++++- docs/add-ons/search/simple.md | 16 +++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/docs/add-ons/search/advanced.md b/docs/add-ons/search/advanced.md index 48f012909..652ee127d 100755 --- a/docs/add-ons/search/advanced.md +++ b/docs/add-ons/search/advanced.md @@ -267,6 +267,63 @@ With this parameter, you can specify the css class you want the form to have, en With this parameter, you can specify the css id you want the form to have. +### `orderby=` + + orderby="entry_date" + +The "orderby" parameter sets the display order of the entries. The available values for this property are `entry_date`, `most_comments`, `recent_comment`, `title`, `status`, `entry_id`, `url_title`, `edit_date`, `comment_total`, `expiration_date`, `view_count_one`, `view_count_two`, `view_count_three`, `view_count_four`.` + +If this parameter is not set, it will default to ordering by entry date. + +### `sort=` + + sort="asc" + + sort="desc" + +The sort order can be "asc" (ascending order or "oldest item first") or "desc" (descending order or "newest item first"). If you do not use a sort order the default is desc. + ## Variables -A full discussion of the available variables is not feasible there is a great deal of interdependence between the various form fields, variables, and javascript functions. The Parameters can be used to modify how the search behaves. If you wish to modify the search form itself, simply use the default form as a base and customize it from there. +### `channel_names` + +Pre-populated string containing list of `