3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * Main page for viewing all Saved searches.
21 class CRM_Contact_Page_CustomSearch
extends CRM_Core_Page
{
24 * The action links that we need to display for the browse screen.
28 public static $_links = NULL;
33 public static function &info() {
35 SELECT v.value, v.label, v.description
36 FROM civicrm_option_group g,
37 civicrm_option_value v
38 WHERE v.option_group_id = g.id
39 AND g.name = 'custom_search'
43 $dao = CRM_Core_DAO
::executeQuery($sql);
46 while ($dao->fetch()) {
47 if (trim($dao->description
)) {
48 $rows[$dao->value
] = $dao->description
;
51 $rows[$dao->value
] = $dao->label
;
58 * Browse all custom searches.
61 * content of the parents run method
63 public function browse() {
65 $this->assign('rows', $rows);
70 * Run this page (figure out the action needed and perform it).
72 public function run() {
73 $action = CRM_Utils_Request
::retrieve('action',
75 $this, FALSE, 'browse'
78 $this->assign('action', $action);
79 return $this->browse();