Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Developer Documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Documentation
Docs
Developer Documentation
Commits
9470d7a3
Commit
9470d7a3
authored
7 years ago
by
Sean Madsen
Browse files
Options
Downloads
Patches
Plain Diff
Civix custom search - add more details
parent
44c3cc51
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/extensions/civix.md
+15
-1
15 additions, 1 deletion
docs/extensions/civix.md
with
15 additions
and
1 deletion
docs/extensions/civix.md
+
15
−
1
View file @
9470d7a3
...
...
@@ -540,7 +540,7 @@ SQL logic and form layouts. Use this command to get started:
civix
help
generate:search
```
Then you could generate your basic search code for a MySearch class with:
Then you could generate your basic search code for a
`
MySearch
`
class with:
```
bash
civix generate:search MySearch
...
...
@@ -556,6 +556,7 @@ This command will create two files:
-
`CRM/Myextension/Form/Search/MySearch.php`
contains the
form-builder and query-builder for the custom search.
#### Copying an existing search
If one of the existing searches is close to
meeting your needs you may copy it instead and then customise the
...
...
@@ -576,6 +577,19 @@ civix generate:search --copy CRM_Contact_Form_Search_Custom_ZipCodeRange MySearc
The "copy" option will create either two or three files depending
on whether the original search screen defines its own Smarty template.
#### Using your search
1.
Disable and re-enable your extension.
1.
Go to
**Search > Custom Searches...**
and find your new custom search listed at the bottom.
#### Building your custom search
Now you have a working custom search, but how do you make it
*do*
something
*custom*
?
See this (somewhat outdated)
[
wiki page
](
https://wiki.civicrm.org/confluence/display/CRMDOC46/Create+a+Custom-Search+Extension
)
for more information.
### Add an API function {:#generate-api}
The
[
CiviCRM API
](
/api/general
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment