ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilAdvancedSearchGUI Class Reference
+ Inheritance diagram for ilAdvancedSearchGUI:
+ Collaboration diagram for ilAdvancedSearchGUI:

Public Member Functions

 __construct ()
 Constructor @access public. More...
 
 getRootNode ()
 
 executeCommand ()
 Control @access public. More...
 
 reset ()
 
 searchInResults ()
 
 performSearch ()
 
 showAdvMDSearch ()
 Show advanced meta data search. More...
 
 showSearch ()
 
 prepareOutput ()
 
 showSavedResults ()
 
__performContentSearch ()
 
__performTitleSearch ()
 
__performGeneralSearch ()
 
__performLifecycleSearch ()
 
__performLanguageSearch ()
 
__performContributeSearch ()
 
__performEntitySearch ()
 
__performRequirementSearch ()
 
__performFormatSearch ()
 
__performEducationalSearch ()
 
__performTypicalAgeRangeSearch ()
 
__performRightsSearch ()
 
__performClassificationSearch ()
 
__performTaxonSearch ()
 
__performKeywordSearch ()
 
 __setSearchOptions (&$post_vars)
 
 __getFilterSelect ()
 
 __storeEntries ($res, $new_res)
 
 setSubTabs ()
 set sub tabs More...
 
- Public Member Functions inherited from ilSearchBaseGUI
 __construct ()
 Constructor @access public. More...
 
 prepareOutput ()
 
 initStandardSearchForm ($a_mode)
 Init standard search form. More...
 
 getSearchAreaForm ()
 Init standard search form. More...
 
 handleCommand ($a_cmd)
 Handle command. More...
 
 addToDeskObject ()
 Interface methods. More...
 
 removeFromDeskObject ()
 Remove from dektop. More...
 
 delete ()
 Show deletion screen. More...
 
 cancelDelete ()
 Cancel delete. More...
 
 cancelMoveLinkObject ()
 Cancel move/link. More...
 
 performDelete ()
 Delete objects. More...
 
 cut ()
 Interface ilAdministrationCommandHandler. More...
 
 link ()
 Interface ilAdministrationCommandHandler. More...
 
 paste ()
 Paste. More...
 
 showLinkIntoMultipleObjectsTree ()
 Target selection link. More...
 
 showMoveIntoObjectTree ()
 Target selection cut. More...
 
 performPasteIntoMultipleObjects ()
 Perform paste into multiple objects. More...
 
 clear ()
 clear clipboard More...
 
 enableAdministrationPanel ()
 Enable administration panel. More...
 
 disableAdministrationPanel ()
 Disable administration panel. More...
 
 keepObjectsInClipboardObject ()
 cancel action but keep objects in clipboard
Returns
void
More...
 
 addLocator ()
 Add Locator. More...
 
 autoComplete ()
 Data resource for autoComplete. More...
 
 addToDeskObject ()
 Add desktop item @access public. More...
 
 removeFromDeskObject ()
 Remove from desktop @access public. More...
 
 delete ()
 Show delete confirmation. More...
 
 cancelDelete ()
 Cancel delete. More...
 
 performDelete ()
 Perform Delete. More...
 
 cut ()
 Cut object. More...
 
 showLinkIntoMultipleObjectsTree ()
 Target selection link. More...
 
 showMoveIntoObjectTree ()
 Target selection cut. More...
 
 performPasteIntoMultipleObjects ()
 Perform paste into multiple objects. More...
 
 paste ()
 Paste. More...
 
 clear ()
 clear clipboard More...
 
 enableAdministrationPanel ()
 Enable administration panel. More...
 
 disableAdministrationPanel ()
 Disable administration panel. More...
 
 cancelMoveLinkObject ()
 Cancel move/link. More...
 
 keepObjectsInClipboardObject ()
 cancel action but keep objects in clipboard More...
 

Data Fields

const TYPE_LOM = 1
 
const TYPE_ADV_MD = 2
 
- Data Fields inherited from ilSearchBaseGUI
const SEARCH_FAST = 1
 
const SEARCH_DETAILS = 2
 
const SEARCH_AND = 'and'
 
const SEARCH_OR = 'or'
 
const SEARCH_FORM_LUCENE = 1
 
const SEARCH_FORM_STANDARD = 2
 
const SEARCH_FORM_USER = 3
 
 $ilias = null
 
 $lng = null
 
 $tpl = null
 

Protected Member Functions

 remoteSearch ()
 Search from main menu. More...
 
 initAdvancedMetaDataForm ()
 @access protected More...
 
 performAdvMDSearch ()
 perform advanced meta data search More...
 
 initFormSearch ()
 Show search form. More...
 
- Protected Member Functions inherited from ilSearchBaseGUI
 addPager ($result, $a_session_key)
 Add Pager. More...
 
 buildSearchAreaPath ($a_root_node)
 Build path for search area. More...
 
 getCreationDateForm ()
 
 getSearchCache ()
 Get user search cache. More...
 
 loadCreationFilter ()
 Load creation date filter. More...
 

Protected Attributes

 $last_section = 'adv_search'
 
 $fields = array()
 
 $tabs_gui
 
- Protected Attributes inherited from ilSearchBaseGUI
 $settings = null
 
 $ctrl = null
 

Private Member Functions

 showSavedAdvMDResults ()
 show advanced meta data results More...
 
 searchAdvancedMD ($res)
 Perform advanced meta data search. More...
 
 initUserSearchCache ()
 Init user search cache. More...
 
 toUnixTime ($date, $time=array())
 convert input array to unix time More...
 
 initSearchType ($type)
 init search type (LOM Search or Advanced meta data search) More...
 

Private Attributes

 $options = array()
 array of all options select boxes,'and' 'or' and query strings @access public More...
 

Detailed Description

Definition at line 43 of file class.ilAdvancedSearchGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilAdvancedSearchGUI::__construct ( )

Constructor @access public.

Reimplemented from ilSearchBaseGUI.

Definition at line 66 of file class.ilAdvancedSearchGUI.php.

67 {
68 global $ilTabs;
69
70 $this->tabs_gui = $ilTabs;
71
72 parent::__construct();
73
74 $this->lng->loadLanguageModule('meta');
76
78 }
$_POST["username"]
static getInstance()
Get singleton instance.
$errors fields
Definition: imgupload.php:51

References $_POST, __setSearchOptions(), fields, and ilLuceneAdvancedSearchFields\getInstance().

+ Here is the call graph for this function:

Member Function Documentation

◆ __getFilterSelect()

ilAdvancedSearchGUI::__getFilterSelect ( )

Definition at line 993 of file class.ilAdvancedSearchGUI.php.

994 {
995 $options = array('all' => $this->lng->txt('search_any'),
996 'crs' => $this->lng->txt('objs_crs'),
997 'lms' => $this->lng->txt('learning_resources'),
998 'glo' => $this->lng->txt('objs_glo'),
999 'mep' => $this->lng->txt('objs_mep'),
1000 'tst' => $this->lng->txt('search_tst_svy'),
1001 'file'=> $this->lng->txt('objs_file'),
1002 'webr' => $this->lng->txt('objs_webr'),
1003 'sess' => $this->lng->txt('objs_sess')
1004 );
1005
1006
1007 return ilUtil::formSelect($this->options['type'], 'search_adv[type]', $options, false, true);
1008 }
$options
array of all options select boxes,'and' 'or' and query strings @access public
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.

References $options, and ilUtil\formSelect().

+ Here is the call graph for this function:

◆ __performClassificationSearch()

& ilAdvancedSearchGUI::__performClassificationSearch ( )

Definition at line 798 of file class.ilAdvancedSearchGUI.php.

799 {
800 // Return if 'any'
801 if (!$this->options['lom_purpose']) {
802 return false;
803 }
804 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
805 include_once 'Services/Search/classes/class.ilQueryParser.php';
806
807
809 $meta_search->setFilter($this->filter);
810 $meta_search->setMode('classification');
811 $meta_search->setOptions($this->options);
812 $res =&$meta_search->performSearch();
813
814 return $res;
815 }
static _getAdvancedSearchInstance($query_parser)
get reference of ilFulltextAdvancedSearch
foreach($_POST as $key=> $value) $res

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performContentSearch()

& ilAdvancedSearchGUI::__performContentSearch ( )

Definition at line 534 of file class.ilAdvancedSearchGUI.php.

535 {
536 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
537 include_once 'Services/Search/classes/class.ilQueryParser.php';
538 include_once 'Services/Search/classes/class.ilSearchResult.php';
539
540 if (!$this->options['lom_content']) {
541 return false;
542 }
543
544 $res = new ilSearchResult();
545
546 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_content']));
547 #$query_parser->setCombination($this->options['content_ao']);
548 $query_parser->setCombination(QP_COMBINATION_OR);
549 $query_parser->parse();
550
551 if ($this->options['type'] == 'all' or $this->options['type'] == 'lms') {
552 // LM content search
553 $lm_search =&ilObjectSearchFactory::_getLMContentSearchInstance($query_parser);
554 $res_cont =&$lm_search->performSearch();
555 $res->mergeEntries($res_cont);
556 }
557 if ($this->options['type'] == 'all' or $this->options['type'] == 'tst') {
558 $tst_search =&ilObjectSearchFactory::_getTestSearchInstance($query_parser);
559 $res_tes =&$tst_search->performSearch();
560 $res->mergeEntries($res_tes);
561 }
562 if ($this->options['type'] == 'all' or $this->options['type'] == 'mep') {
563 $med_search =&ilObjectSearchFactory::_getMediaPoolSearchInstance($query_parser);
564 $res_med =&$med_search->performSearch();
565 $res->mergeEntries($res_med);
566 }
567 if ($this->options['type'] == 'all' or $this->options['type'] == 'glo') {
569 $res_glo =&$glo_search->performSearch();
570 $res->mergeEntries($res_glo);
571 }
572 if ($this->options['type'] == 'all' or $this->options['type'] == 'webr') {
573 $web_search =&ilObjectSearchFactory::_getWebresourceSearchInstance($query_parser);
574 $res_web =&$web_search->performSearch();
575 $res->mergeEntries($res_web);
576 }
577 if ($tit_res = $this->__performTitleSearch()) {
578 $res->mergeEntries($tit_res);
579 }
580
581 return $res;
582 }
const QP_COMBINATION_OR
static _getMediaPoolSearchInstance($query_parser)
get reference of ilFulltextMediapoolSearch
static _getLMContentSearchInstance($query_parser)
get reference of ilFulltextLMContentSearch
static _getWebresourceSearchInstance($query_parser)
get reference of ilFulltextWebresourceSearch
static _getTestSearchInstance($query_parser)
get reference of ilFulltextTestSearch
static _getGlossaryDefinitionSearchInstance($query_parser)
get reference of ilFulltextGlossaryDefinitionSearch
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $res, __performTitleSearch(), ilObjectSearchFactory\_getGlossaryDefinitionSearchInstance(), ilObjectSearchFactory\_getLMContentSearchInstance(), ilObjectSearchFactory\_getMediaPoolSearchInstance(), ilObjectSearchFactory\_getTestSearchInstance(), ilObjectSearchFactory\_getWebresourceSearchInstance(), QP_COMBINATION_OR, and ilUtil\stripSlashes().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performContributeSearch()

& ilAdvancedSearchGUI::__performContributeSearch ( )

Definition at line 682 of file class.ilAdvancedSearchGUI.php.

683 {
684 if (!strlen($this->options['lom_role'])) {
685 return false;
686 }
687 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
688 include_once 'Services/Search/classes/class.ilQueryParser.php';
689
690
692 $meta_search->setFilter($this->filter);
693 $meta_search->setMode('contribute');
694 $meta_search->setOptions($this->options);
695 $res =&$meta_search->performSearch();
696
697 return $res;
698 }

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performEducationalSearch()

& ilAdvancedSearchGUI::__performEducationalSearch ( )

Definition at line 752 of file class.ilAdvancedSearchGUI.php.

753 {
754 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
755 include_once 'Services/Search/classes/class.ilQueryParser.php';
756
757
759 $meta_search->setFilter($this->filter);
760 $meta_search->setMode('educational');
761 $meta_search->setOptions($this->options);
762 $res =&$meta_search->performSearch();
763
764 return $res;
765 }

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performEntitySearch()

& ilAdvancedSearchGUI::__performEntitySearch ( )

Definition at line 699 of file class.ilAdvancedSearchGUI.php.

700 {
701 // Return if 'any'
702 if (!$this->options['lom_role_entry']) {
703 return false;
704 }
705
706 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
707 include_once 'Services/Search/classes/class.ilQueryParser.php';
708
709 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_role_entry']));
710 #$query_parser->setCombination($this->options['entity_ao']);
711 $query_parser->setCombination(QP_COMBINATION_OR);
712 $query_parser->parse();
713
714 $meta_search =&ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
715 $meta_search->setFilter($this->filter);
716 $meta_search->setMode('entity');
717 $meta_search->setOptions($this->options);
718 $res =&$meta_search->performSearch();
719
720 return $res;
721 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), QP_COMBINATION_OR, and ilUtil\stripSlashes().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performFormatSearch()

& ilAdvancedSearchGUI::__performFormatSearch ( )

Definition at line 738 of file class.ilAdvancedSearchGUI.php.

739 {
740 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
741 include_once 'Services/Search/classes/class.ilQueryParser.php';
742
743
745 $meta_search->setFilter($this->filter);
746 $meta_search->setMode('format');
747 $meta_search->setOptions($this->options);
748 $res =&$meta_search->performSearch();
749
750 return $res;
751 }

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performGeneralSearch()

& ilAdvancedSearchGUI::__performGeneralSearch ( )

Definition at line 617 of file class.ilAdvancedSearchGUI.php.

618 {
619 if (!$this->options['lom_coverage'] and !$this->options['lom_structure']) {
620 return false;
621 }
622
623 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
624 include_once 'Services/Search/classes/class.ilQueryParser.php';
625
626 if ($this->options['lom_coverage']) {
627 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_coverage']));
628 #$query_parser->setCombination($this->options['coverage_ao']);
629 $query_parser->setCombination(QP_COMBINATION_OR);
630 $query_parser->parse();
631 } else {
632 $query_parser = new ilQueryParser('');
633 }
634 $meta_search =&ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
635 $meta_search->setFilter($this->filter);
636 $meta_search->setMode('general');
637 $meta_search->setOptions($this->options);
638 $res =&$meta_search->performSearch();
639
640 return $res;
641 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), QP_COMBINATION_OR, and ilUtil\stripSlashes().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performKeywordSearch()

& ilAdvancedSearchGUI::__performKeywordSearch ( )

Definition at line 887 of file class.ilAdvancedSearchGUI.php.

888 {
889 // Return if 'any'
890 if (!$this->options['lom_keyword']) {
891 return false;
892 }
893 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
894 include_once 'Services/Search/classes/class.ilQueryParser.php';
895
896 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_keyword']));
897 #$query_parser->setCombination($this->options['keyword_ao']);
898 $query_parser->setCombination(QP_COMBINATION_OR);
899 $query_parser->parse();
900
901 $meta_search =&ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
902 $meta_search->setFilter($this->filter);
903 $meta_search->setMode('keyword');
904 $meta_search->setOptions($this->options);
905 $res =&$meta_search->performSearch();
906
907 return $res;
908 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), QP_COMBINATION_OR, and ilUtil\stripSlashes().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performLanguageSearch()

& ilAdvancedSearchGUI::__performLanguageSearch ( )

Definition at line 665 of file class.ilAdvancedSearchGUI.php.

666 {
667 if (!$this->options['lom_language']) {
668 return false;
669 }
670 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
671 include_once 'Services/Search/classes/class.ilQueryParser.php';
672
673
675 $meta_search->setFilter($this->filter);
676 $meta_search->setMode('language');
677 $meta_search->setOptions($this->options);
678 $res =&$meta_search->performSearch();
679
680 return $res;
681 }

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performLifecycleSearch()

& ilAdvancedSearchGUI::__performLifecycleSearch ( )

Definition at line 643 of file class.ilAdvancedSearchGUI.php.

644 {
645 // Return if 'any'
646 if (!$this->options['lom_status'] and !$this->options['lom_version']) {
647 return false;
648 }
649 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
650 include_once 'Services/Search/classes/class.ilQueryParser.php';
651
652 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_version']));
653 #$query_parser->setCombination($this->options['version_ao']);
654 $query_parser->setCombination(QP_COMBINATION_OR);
655 $query_parser->parse();
656
657 $meta_search =&ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
658 $meta_search->setFilter($this->filter);
659 $meta_search->setMode('lifecycle');
660 $meta_search->setOptions($this->options);
661 $res =&$meta_search->performSearch();
662
663 return $res;
664 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), QP_COMBINATION_OR, and ilUtil\stripSlashes().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performRequirementSearch()

& ilAdvancedSearchGUI::__performRequirementSearch ( )

Definition at line 724 of file class.ilAdvancedSearchGUI.php.

725 {
726 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
727 include_once 'Services/Search/classes/class.ilQueryParser.php';
728
729
731 $meta_search->setFilter($this->filter);
732 $meta_search->setMode('requirement');
733 $meta_search->setOptions($this->options);
734 $res =&$meta_search->performSearch();
735
736 return $res;
737 }

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performRightsSearch()

& ilAdvancedSearchGUI::__performRightsSearch ( )

Definition at line 780 of file class.ilAdvancedSearchGUI.php.

781 {
782 if (!$this->options['lom_copyright'] and !$this->options['lom_costs']) {
783 return false;
784 }
785 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
786 include_once 'Services/Search/classes/class.ilQueryParser.php';
787
788
790 $meta_search->setFilter($this->filter);
791 $meta_search->setMode('rights');
792 $meta_search->setOptions($this->options);
793 $res =&$meta_search->performSearch();
794
795 return $res;
796 }

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performTaxonSearch()

& ilAdvancedSearchGUI::__performTaxonSearch ( )

Definition at line 817 of file class.ilAdvancedSearchGUI.php.

818 {
819 // Return if 'any'
820 if (!$this->options['lom_taxon']) {
821 return false;
822 }
823 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
824 include_once 'Services/Search/classes/class.ilQueryParser.php';
825
826 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_taxon']));
827 $query_parser->setCombination(QP_COMBINATION_OR);
828 $query_parser->parse();
829
830 $meta_search =&ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
831 $meta_search->setFilter($this->filter);
832 $meta_search->setMode('taxon');
833 $meta_search->setOptions($this->options);
834 $res =&$meta_search->performSearch();
835
836 return $res;
837 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), QP_COMBINATION_OR, and ilUtil\stripSlashes().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performTitleSearch()

& ilAdvancedSearchGUI::__performTitleSearch ( )

Definition at line 585 of file class.ilAdvancedSearchGUI.php.

586 {
587 if (!$this->options['lom_content']) {
588 return false;
589 }
590
591 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
592 include_once 'Services/Search/classes/class.ilQueryParser.php';
593
594 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_content']));
595 #$query_parser->setCombination($this->options['title_ao']);
596 $query_parser->setCombination(QP_COMBINATION_OR);
597 $query_parser->parse();
598 $meta_search =&ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
599
600 $meta_search->setFilter($this->filter);
601 $meta_search->setMode('title_description');
602 $meta_search->setOptions($this->options);
603 $res_tit =&$meta_search->performSearch();
604
605 $meta_search->setMode('keyword_all');
606 $res_key =&$meta_search->performSearch();
607
608 // merge them
609 $res_tit->mergeEntries($res_key);
610
611
612 return $res_tit;
613 }

References ilObjectSearchFactory\_getAdvancedSearchInstance(), QP_COMBINATION_OR, and ilUtil\stripSlashes().

Referenced by __performContentSearch(), and performAdvMDSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __performTypicalAgeRangeSearch()

& ilAdvancedSearchGUI::__performTypicalAgeRangeSearch ( )

Definition at line 766 of file class.ilAdvancedSearchGUI.php.

767 {
768 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
769 include_once 'Services/Search/classes/class.ilQueryParser.php';
770
771
773 $meta_search->setFilter($this->filter);
774 $meta_search->setMode('typical_age_range');
775 $meta_search->setOptions($this->options);
776 $res =&$meta_search->performSearch();
777
778 return $res;
779 }

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __setSearchOptions()

ilAdvancedSearchGUI::__setSearchOptions ( $post_vars)

Definition at line 910 of file class.ilAdvancedSearchGUI.php.

911 {
912 if (isset($_POST['cmd']['performSearch'])) {
913 $this->options = $_SESSION['search_adv'] = $_POST['query'];
914 } elseif (isset($_POST['cmd']['performAdvMDSearch'])) {
915 $this->options = $_SESSION['search_adv_md'] = $_POST;
916 } else {
917 $this->options = $_SESSION['search_adv'];
918 }
919
920 $_POST['result'] = $_POST['id'];
921
922 $this->filter = array();
923
924 $this->options['type'] = 'all';
925 switch ($this->options['type']) {
926 case 'cat':
927 $this->filter[] = 'cat';
928 break;
929
930 case 'webr':
931 $this->filter[] = 'webr';
932 break;
933
934 case 'lms':
935 $this->filter[] = 'lm';
936 $this->filter[] = 'dbk';
937 $this->filter[] = 'pg';
938 $this->filter[] = 'st';
939 $this->filter[] = 'sahs';
940 $this->filter[] = 'htlm';
941 break;
942
943 case 'glo':
944 $this->filter[] = 'glo';
945 break;
946
947 case 'tst':
948 $this->filter[] = 'tst';
949 $this->filter[] = 'svy';
950 $this->filter[] = 'qpl';
951 $this->filter[] = 'spl';
952 break;
953
954 case 'mep':
955 $this->filter[] = 'mep';
956 break;
957
958 case 'crs':
959 $this->filter[] = 'crs';
960 break;
961
962 case 'file':
963 $this->filter[] = 'file';
964 break;
965
966 case 'adv_all':
967 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
969 break;
970
971 case 'all':
972 default:
973 $this->filter[] = 'sess';
974 $this->filter[] = 'webr';
975 $this->filter[] = 'crs';
976 $this->filter[] = 'mep';
977 $this->filter[] = 'tst';
978 $this->filter[] = 'svy';
979 $this->filter[] = 'qpl';
980 $this->filter[] = 'spl';
981 $this->filter[] = 'glo';
982 $this->filter[] = 'lm';
983 $this->filter[] = 'dbk';
984 $this->filter[] = 'pg';
985 $this->filter[] = 'st';
986 $this->filter[] = 'sahs';
987 $this->filter[] = 'htlm';
988 $this->filter[] = 'file';
989 }
990 return true;
991 }
$_SESSION["AccountId"]
static _getActivatedObjTypes()
get activated obj types

References $_POST, $_SESSION, and ilAdvancedMDRecord\_getActivatedObjTypes().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __storeEntries()

ilAdvancedSearchGUI::__storeEntries (   $res,
  $new_res 
)

Definition at line 1011 of file class.ilAdvancedSearchGUI.php.

1012 {
1013 if ($this->stored == false) {
1014 $res->mergeEntries($new_res);
1015 $this->stored = true;
1016
1017 return true;
1018 } else {
1019 $res->intersectEntries($new_res);
1020 return true;
1021 }
1022 }

References $res.

Referenced by performAdvMDSearch(), performSearch(), and searchAdvancedMD().

+ Here is the caller graph for this function:

◆ executeCommand()

ilAdvancedSearchGUI::executeCommand ( )

Control @access public.

Definition at line 90 of file class.ilAdvancedSearchGUI.php.

91 {
92 global $rbacsystem;
93
94 $next_class = $this->ctrl->getNextClass($this);
95 $cmd = $this->ctrl->getCmd();
96
97 switch ($next_class) {
98 case "ilpropertyformgui":
99
100
101 case 'ilobjectcopygui':
102 $this->prepareOutput();
103 $this->ctrl->setReturn($this, '');
104
105 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
106 $cp = new ilObjectCopyGUI($this);
107 $this->ctrl->forwardCommand($cp);
108 break;
109
110 default:
111 $this->initUserSearchCache();
112 if (!$cmd) {
113 switch ($_SESSION['search_last_sub_section']) {
115 $cmd = "showSavedAdvMDResults";
116 break;
117
118 default:
119 $cmd = "showSavedResults";
120 break;
121 }
122 }
123
124 $this->prepareOutput();
125 $this->handleCommand($cmd);
126 break;
127 }
128 return true;
129 }
initUserSearchCache()
Init user search cache.
GUI class for the workflow of copying objects.
handleCommand($a_cmd)
Handle command.

References $_SESSION, ilSearchBaseGUI\handleCommand(), initUserSearchCache(), prepareOutput(), and TYPE_ADV_MD.

+ Here is the call graph for this function:

◆ getRootNode()

ilAdvancedSearchGUI::getRootNode ( )

Definition at line 80 of file class.ilAdvancedSearchGUI.php.

81 {
82 return ROOT_FOLDER_ID;
83 }

Referenced by performAdvMDSearch(), and performSearch().

+ Here is the caller graph for this function:

◆ initAdvancedMetaDataForm()

ilAdvancedSearchGUI::initAdvancedMetaDataForm ( )
protected

@access protected

Definition at line 272 of file class.ilAdvancedSearchGUI.php.

273 {
274 if (is_object($this->form)) {
275 return $this->form;
276 }
277
278 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
279 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
280 $this->form = new ilPropertyFormGUI();
281 $this->form->setFormAction($this->ctrl->getFormAction($this, 'performAdvMDSearch'));
282 $this->form->setTitle($this->lng->txt('adv_md_search_title'));
283 $this->form->addCommandButton('performAdvMDSearch', $this->lng->txt('search'));
284 #$this->form->setSubformMode('right');
285
286 $content = new ilTextInputGUI($this->lng->txt('meta_title') . '/' .
287 $this->lng->txt('meta_keyword') . '/' .
288 $this->lng->txt('meta_description'), 'title');
289 $content->setValue($this->options['title']);
290 $content->setSize(30);
291 $content->setMaxLength(255);
292 // $content->setSubformMode('right');
293 $group = new ilRadioGroupInputGUI('', 'title_ao');
294 $group->setValue($this->options['title_ao']);
295 $radio_option = new ilRadioOption($this->lng->txt("search_any_word"), 0);
296 $group->addOption($radio_option);
297 $radio_option = new ilRadioOption($this->lng->txt("search_all_words"), 1);
298 $group->addOption($radio_option);
299 $content->addSubItem($group);
300 $this->form->addItem($content);
301
302 $type = new ilSelectInputGUI($this->lng->txt('type'), 'type');
303 $options['adv_all'] = $this->lng->txt('search_any');
304 foreach (ilAdvancedMDRecord::_getActivatedObjTypes() as $obj_type) {
305 $options[$obj_type] = $this->lng->txt('objs_' . $obj_type);
306 }
307 $type->setOptions($options);
308 $type->setValue($this->options['type']);
309 $this->form->addItem($type);
310
311 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
313 $record_gui->setPropertyForm($this->form);
314 $record_gui->setSearchValues($this->options);
315 $record_gui->parse();
316 }
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a selection list property in a property form.
This class represents a text property in a property form.
$type
if(isset($_POST['submit'])) $form

References $form, $options, $type, ilAdvancedMDRecord\_getActivatedObjTypes(), and ilAdvancedMDRecordGUI\MODE_SEARCH.

Referenced by showAdvMDSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormSearch()

ilAdvancedSearchGUI::initFormSearch ( )
protected

Show search form.

Definition at line 401 of file class.ilAdvancedSearchGUI.php.

402 {
403 global $tree;
404
405 include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
406
407 $this->form = new ilPropertyFormGUI();
408 $this->form->setFormAction($this->ctrl->getFormAction($this, 'performSearch'));
409 $this->form->setTitle($this->lng->txt('search_advanced'));
410 $this->form->addCommandButton('performSearch', $this->lng->txt('search'));
411 $this->form->addCommandButton('reset', $this->lng->txt('reset'));
412
413 foreach ($this->fields->getActiveSections() as $definition) {
414 if ($definition['name'] != 'default') {
416 $section->setTitle($definition['name']);
417 $this->form->addItem($section);
418 }
419
420 foreach ($definition['fields'] as $field_name) {
421 if (is_object($element = $this->fields->getFormElement($this->search_cache->getQuery(), $field_name, $this->form))) {
422 $this->form->addItem($element);
423 }
424 }
425 }
426 return true;
427 }
$section
Definition: Utf8Test.php:83
This class represents a section header in a property form.

References $section, and fields.

Referenced by searchAdvancedMD(), and showSearch().

+ Here is the caller graph for this function:

◆ initSearchType()

ilAdvancedSearchGUI::initSearchType (   $type)
private

init search type (LOM Search or Advanced meta data search)

@access private

Parameters

Definition at line 1083 of file class.ilAdvancedSearchGUI.php.

1084 {
1085 if ($type == self::TYPE_LOM) {
1086 $_SESSION['search_last_sub_section'] = self::TYPE_LOM;
1087 $this->search_cache->switchSearchType(ilUserSearchCache::ADVANCED_SEARCH);
1088 } else {
1089 $_SESSION['search_last_sub_section'] = self::TYPE_ADV_MD;
1090 $this->search_cache->switchSearchType(ilUserSearchCache::ADVANCED_MD_SEARCH);
1091 }
1092 }

References $_SESSION, $type, ilUserSearchCache\ADVANCED_MD_SEARCH, ilUserSearchCache\ADVANCED_SEARCH, TYPE_ADV_MD, and TYPE_LOM.

Referenced by performAdvMDSearch(), performSearch(), reset(), searchInResults(), showSavedAdvMDResults(), and showSavedResults().

+ Here is the caller graph for this function:

◆ initUserSearchCache()

ilAdvancedSearchGUI::initUserSearchCache ( )
private

Init user search cache.

@access private

Definition at line 1030 of file class.ilAdvancedSearchGUI.php.

1031 {
1032 global $ilUser;
1033
1034 include_once('Services/Search/classes/class.ilUserSearchCache.php');
1035 $this->search_cache = ilUserSearchCache::_getInstance($ilUser->getId());
1036 $this->search_cache->switchSearchType(ilUserSearchCache::ADVANCED_SEARCH);
1037 if ($_GET['page_number']) {
1038 $this->search_cache->setResultPageNumber((int) $_GET['page_number']);
1039 }
1040 if ($_POST['cmd']['performSearch']) {
1041 $this->search_cache->setQuery(ilUtil::stripSlashes($_POST['query']['lomContent']));
1042 $this->search_cache->save();
1043 }
1044 }
$_GET["client_id"]
static _getInstance($a_usr_id)
Get singleton instance.
$ilUser
Definition: imgupload.php:18

References $_GET, $_POST, $ilUser, ilUserSearchCache\_getInstance(), ilUserSearchCache\ADVANCED_SEARCH, and ilUtil\stripSlashes().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ performAdvMDSearch()

ilAdvancedSearchGUI::performAdvMDSearch ( )
protected

perform advanced meta data search

@access protected

Definition at line 323 of file class.ilAdvancedSearchGUI.php.

324 {
325 global $ilUser;
326
327 $this->initSearchType(self::TYPE_ADV_MD);
328 if (!isset($_GET['page_number']) and $this->search_mode != 'in_results') {
329 unset($_SESSION['adv_max_page']);
330 $this->search_cache->delete();
331 }
332
333 include_once 'Services/Search/classes/class.ilSearchResult.php';
334 $res = new ilSearchResult();
335
336 if ($res_tit =&$this->__performTitleSearch()) {
337 $this->__storeEntries($res, $res_tit);
338 }
339 $this->searchAdvancedMD($res);
340
341 if ($this->search_mode == 'in_results') {
342 include_once 'Services/Search/classes/class.ilSearchResult.php';
343
344 $old_result_obj = new ilSearchResult($ilUser->getId());
345 $old_result_obj->read(ADVANCED_MD_SEARCH);
346
347 $res->diffEntriesFromResult($old_result_obj);
348 }
349
350
351 $res->filter($this->getRootNode(), true);
352 $res->save();
353 $this->showAdvMDSearch();
354
355 if (!count($res->getResults())) {
356 ilUtil::sendInfo($this->lng->txt('search_no_match'));
357 }
358
359 if ($res->isLimitReached()) {
360 #$message = sprintf($this->lng->txt('search_limit_reached'),$this->settings->getMaxHits());
361 #ilUtil::sendInfo($message);
362 }
363
364 $this->addPager($res, 'adv_max_page');
365
366 include_once './Services/Search/classes/class.ilSearchResultPresentation.php';
368 $presentation->setResults($res->getResultsForPresentation());
369 $presentation->setPreviousNext($this->prev_link, $this->next_link);
370
371 if ($presentation->render()) {
372 $this->tpl->setVariable('RESULTS', $presentation->getHTML(true));
373 }
374 return true;
375 }
const ADVANCED_MD_SEARCH
initSearchType($type)
init search type (LOM Search or Advanced meta data search)
searchAdvancedMD($res)
Perform advanced meta data search.
showAdvMDSearch()
Show advanced meta data search.
addPager($result, $a_session_key)
Add Pager.
Presentation of search results using object list gui.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References $_GET, $_SESSION, $ilUser, $res, __performTitleSearch(), __storeEntries(), ilSearchBaseGUI\addPager(), ADVANCED_MD_SEARCH, getRootNode(), initSearchType(), ilSearchResultPresentation\MODE_STANDARD, searchAdvancedMD(), ilUtil\sendInfo(), and showAdvMDSearch().

+ Here is the call graph for this function:

◆ performSearch()

ilAdvancedSearchGUI::performSearch ( )

Definition at line 168 of file class.ilAdvancedSearchGUI.php.

169 {
170 global $ilUser;
171
172 $this->initSearchType(self::TYPE_LOM);
173
174 if (!isset($_GET['page_number']) and $this->search_mode != 'in_results') {
175 unset($_SESSION['adv_max_page']);
176 $this->search_cache->deleteCachedEntries();
177 }
178
179 if (isset($_POST['query'])) {
180 $this->search_cache->setQuery($_POST['query']);
181 }
182
183
184 include_once 'Services/Search/classes/class.ilSearchResult.php';
185 $res = new ilSearchResult();
186
187 if ($res_con =&$this->__performContentSearch()) {
188 $this->__storeEntries($res, $res_con);
189 }
190 if ($res_lan =&$this->__performLanguageSearch()) {
191 $this->__storeEntries($res, $res_lan);
192 }
193 if ($res_gen =&$this->__performGeneralSearch()) {
194 $this->__storeEntries($res, $res_gen);
195 }
196 if ($res_lif =&$this->__performLifecycleSearch()) {
197 $this->__storeEntries($res, $res_lif);
198 }
199 if ($res_con =&$this->__performContributeSearch()) {
200 $this->__storeEntries($res, $res_con);
201 }
202 if ($res_ent =&$this->__performEntitySearch()) {
203 $this->__storeEntries($res, $res_ent);
204 }
205 if ($res_req =&$this->__performRequirementSearch()) {
206 $this->__storeEntries($res, $res_req);
207 }
208 if ($res_for =&$this->__performFormatSearch()) {
209 $this->__storeEntries($res, $res_for);
210 }
211 if ($res_edu =&$this->__performEducationalSearch()) {
212 $this->__storeEntries($res, $res_edu);
213 }
214 if ($res_typ =&$this->__performTypicalAgeRangeSearch()) {
215 $this->__storeEntries($res, $res_typ);
216 }
217 if ($res_rig =&$this->__performRightsSearch()) {
218 $this->__storeEntries($res, $res_rig);
219 }
220 if ($res_cla =&$this->__performClassificationSearch()) {
221 $this->__storeEntries($res, $res_cla);
222 }
223 if ($res_tax =&$this->__performTaxonSearch()) {
224 $this->__storeEntries($res, $res_tax);
225 }
226 if ($res_key =&$this->__performKeywordSearch()) {
227 $this->__storeEntries($res, $res_key);
228 }
229
230 $this->searchAdvancedMD($res);
231
232 if ($this->search_mode == 'in_results') {
233 include_once 'Services/Search/classes/class.ilSearchResult.php';
234
235 $old_result_obj = new ilSearchResult($ilUser->getId());
236 $old_result_obj->read(ADVANCED_MD_SEARCH);
237
238 $res->diffEntriesFromResult($old_result_obj);
239 }
240
241 $res->filter($this->getRootNode(), (ilSearchSettings::getInstance()->getDefaultOperator() == ilSearchSettings::OPERATOR_AND));
242 $res->save();
243 $this->showSearch();
244
245 if (!count($res->getResults())) {
246 ilUtil::sendInfo($this->lng->txt('search_no_match'));
247 }
248
249 if ($res->isLimitReached()) {
250 #$message = sprintf($this->lng->txt('search_limit_reached'),$this->settings->getMaxHits());
251 #ilUtil::sendInfo($message);
252 }
253
254 $this->addPager($res, 'adv_max_page');
255
256 include_once './Services/Search/classes/class.ilSearchResultPresentation.php';
258 $presentation->setResults($res->getResultsForPresentation());
259 $presentation->setPreviousNext($this->prev_link, $this->next_link);
260
261 if ($presentation->render()) {
262 $this->tpl->setVariable('RESULTS', $presentation->getHTML(true));
263 }
264 return true;
265 }

References $_GET, $_POST, $_SESSION, $ilUser, $res, __performClassificationSearch(), __performContentSearch(), __performContributeSearch(), __performEducationalSearch(), __performEntitySearch(), __performFormatSearch(), __performGeneralSearch(), __performKeywordSearch(), __performLanguageSearch(), __performLifecycleSearch(), __performRequirementSearch(), __performRightsSearch(), __performTaxonSearch(), __performTypicalAgeRangeSearch(), __storeEntries(), ilSearchBaseGUI\addPager(), ADVANCED_MD_SEARCH, ilSearchSettings\getInstance(), getRootNode(), initSearchType(), ilSearchResultPresentation\MODE_STANDARD, ilSearchSettings\OPERATOR_AND, searchAdvancedMD(), ilUtil\sendInfo(), and showSearch().

Referenced by remoteSearch(), and searchInResults().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareOutput()

ilAdvancedSearchGUI::prepareOutput ( )

Reimplemented from ilSearchBaseGUI.

Definition at line 445 of file class.ilAdvancedSearchGUI.php.

446 {
447 global $ilTabs, $ilHelp;
448
449 parent::prepareOutput();
450
451 $ilHelp->setScreenIdComponent("src");
452
453 $ilTabs->addTab(
454 "search",
455 $this->lng->txt("search"),
456 $this->ctrl->getLinkTargetByClass('ilsearchgui')
457 );
458 $ilTabs->addTab(
459 "adv_search",
460 $this->lng->txt("search_advanced"),
461 $this->ctrl->getLinkTarget($this)
462 );
463 $ilTabs->activateTab("adv_search");
464 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ remoteSearch()

ilAdvancedSearchGUI::remoteSearch ( )
protected

Search from main menu.

Definition at line 153 of file class.ilAdvancedSearchGUI.php.

154 {
155 $this->search_cache->setRoot((int) $_POST['root_id']);
156 $this->search_cache->setResultPageNumber(1);
157 $this->search_cache->setQuery(array('lom_content' => ilUtil::stripSlashes($_POST['queryString'])));
158 $this->search_cache->save();
159
160 $this->options = $this->search_cache->getQuery();
161 $this->options['type'] = 'all';
162
163 $this->performSearch();
164 }

References $_POST, performSearch(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ reset()

ilAdvancedSearchGUI::reset ( )

Definition at line 130 of file class.ilAdvancedSearchGUI.php.

131 {
132 $this->initSearchType(self::TYPE_LOM);
133 $this->options = array();
134 $this->search_cache->setQuery(array());
135 $this->search_cache->save();
136 $this->showSearch();
137 }

References initSearchType(), and showSearch().

+ Here is the call graph for this function:

◆ searchAdvancedMD()

ilAdvancedSearchGUI::searchAdvancedMD (   $res)
private

Perform advanced meta data search.

@access private

Parameters
objresult object

Definition at line 846 of file class.ilAdvancedSearchGUI.php.

847 {
848 $this->initFormSearch();
849
850 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
851 foreach (array_keys($this->options) as $key) {
852 if (substr($key, 0, 3) != 'adv') {
853 continue;
854 }
855
856 // :TODO: ?
857 if (!$key) {
858 continue;
859 }
860
861 $field_id = substr($key, 4);
863
864 $field_form = ilADTFactory::getInstance()->getSearchBridgeForDefinitionInstance($field->getADTDefinition(), true, false);
865 $field_form->setElementId("query[" . $key . "]");
866 $field_form->setForm($this->form);
867
868 // reload search values
869 $field_form->importFromPost($this->options);
870 $field_form->validate();
871
872 $parser_value = $field->getSearchQueryParserValue($field_form);
873
874 include_once 'Services/Search/classes/class.ilQueryParser.php';
875 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
876 $adv_md_search = ilObjectSearchFactory::_getAdvancedMDSearchInstance(new ilQueryParser($parser_value));
877 $adv_md_search->setFilter($this->filter);
878 $adv_md_search->setDefinition($field);
879 $adv_md_search->setSearchElement($field_form);
880 $res_field = $adv_md_search->performSearch();
881 if ($res_field instanceof ilSearchResult) {
882 $this->__storeEntries($res, $res_field);
883 }
884 }
885 }
static getInstance()
Get singleton.
static getInstance($a_field_id, $a_type=null)
Get definition instance by type.
initFormSearch()
Show search form.
static _getAdvancedMDSearchInstance($query_parser)
get advanced meta data search instance
$key
Definition: croninfo.php:18

References $key, $res, __storeEntries(), ilObjectSearchFactory\_getAdvancedMDSearchInstance(), ilAdvancedMDFieldDefinition\getInstance(), ilADTFactory\getInstance(), and initFormSearch().

Referenced by performAdvMDSearch(), and performSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ searchInResults()

ilAdvancedSearchGUI::searchInResults ( )

Definition at line 139 of file class.ilAdvancedSearchGUI.php.

140 {
141 $this->initSearchType(self::TYPE_LOM);
142 $this->search_mode = 'in_results';
143 $this->search_cache->setResultPageNumber(1);
144 unset($_SESSION['adv_max_page']);
145 $this->performSearch();
146
147 return true;
148 }

References $_SESSION, initSearchType(), and performSearch().

+ Here is the call graph for this function:

◆ setSubTabs()

ilAdvancedSearchGUI::setSubTabs ( )

set sub tabs

@access public

Definition at line 1052 of file class.ilAdvancedSearchGUI.php.

1053 {
1054 global $ilTabs;
1055
1056 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
1058 return true;
1059 }
1060 $ilTabs->addSubTabTarget('search_lom', $this->ctrl->getLinkTarget($this, 'showSavedResults'));
1061 #$ilTabs->addSubTabTarget('search_adv_md',$this->ctrl->getLinkTarget($this,'showSavedAdvMDResults'));
1062 }
static getSearchableDefinitionIds()
Get searchable definition ids (performance is key)

References ilAdvancedMDFieldDefinition\getSearchableDefinitionIds().

Referenced by showAdvMDSearch(), and showSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showAdvMDSearch()

ilAdvancedSearchGUI::showAdvMDSearch ( )

Show advanced meta data search.

@access public

Definition at line 383 of file class.ilAdvancedSearchGUI.php.

384 {
385 if (isset($_SESSION['search_adv_md'])) {
386 $this->options = $_SESSION['search_adv_md'];
387 }
388 $this->setSubTabs();
389 $this->tabs_gui->setSubTabActive('search_adv_md');
390
391 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.advanced_adv_search.html', 'Services/Search');
392
394 $this->tpl->setVariable('SEARCH_FORM', $this->form->getHTML());
395 return true;
396 }
initAdvancedMetaDataForm()
@access protected

References $_SESSION, initAdvancedMetaDataForm(), and setSubTabs().

Referenced by performAdvMDSearch(), and showSavedAdvMDResults().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showSavedAdvMDResults()

ilAdvancedSearchGUI::showSavedAdvMDResults ( )
private

show advanced meta data results

@access private

Definition at line 473 of file class.ilAdvancedSearchGUI.php.

474 {
475 global $ilUser;
476
477 // Read old result sets
478 include_once 'Services/Search/classes/class.ilSearchResult.php';
479
480 $this->initSearchType(self::TYPE_ADV_MD);
481 $result_obj = new ilSearchResult($ilUser->getId());
482 $result_obj->read(ADVANCED_MD_SEARCH);
483
484 $this->showAdvMDSearch();
485
486 // Show them
487 if (count($result_obj->getResults())) {
488 $this->addPager($result_obj, 'adv_max_page');
489
490 include_once './Services/Search/classes/class.ilSearchResultPresentation.php';
492 $presentation->setResults($result_obj->getResultsForPresentation());
493 $presentation->setPreviousNext($this->prev_link, $this->next_link);
494
495 if ($presentation->render()) {
496 $this->tpl->setVariable('RESULTS', $presentation->getHTML(true));
497 }
498 }
499
500 return true;
501 }

References $ilUser, ilSearchBaseGUI\addPager(), ADVANCED_MD_SEARCH, initSearchType(), ilSearchResultPresentation\MODE_STANDARD, and showAdvMDSearch().

+ Here is the call graph for this function:

◆ showSavedResults()

ilAdvancedSearchGUI::showSavedResults ( )

Definition at line 504 of file class.ilAdvancedSearchGUI.php.

505 {
506 global $ilUser;
507
508 // Read old result sets
509 include_once 'Services/Search/classes/class.ilSearchResult.php';
510
511 $this->initSearchType(self::TYPE_LOM);
512 $result_obj = new ilSearchResult($ilUser->getId());
513 $result_obj->read(ADVANCED_SEARCH);
514
515 $this->showSearch();
516
517 // Show them
518 if (count($result_obj->getResults())) {
519 $this->addPager($result_obj, 'adv_max_page');
520
521 include_once './Services/Search/classes/class.ilSearchResultPresentation.php';
523 $presentation->setResults($result_obj->getResultsForPresentation());
524 $presentation->setPreviousNext($this->prev_link, $this->next_link);
525
526 if ($presentation->render()) {
527 $this->tpl->setVariable('RESULTS', $presentation->getHTML(true));
528 }
529 }
530
531 return true;
532 }
const ADVANCED_SEARCH

References $ilUser, ilSearchBaseGUI\addPager(), ADVANCED_SEARCH, initSearchType(), ilSearchResultPresentation\MODE_STANDARD, and showSearch().

+ Here is the call graph for this function:

◆ showSearch()

ilAdvancedSearchGUI::showSearch ( )

Definition at line 431 of file class.ilAdvancedSearchGUI.php.

432 {
433 global $ilLocator;
434
435 $this->setSubTabs();
436 $this->tabs_gui->setSubTabActive('search_lom');
437
438 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.advanced_search.html', 'Services/Search');
439
440 $this->initFormSearch();
441 $this->tpl->setVariable('SEARCH_FORM', $this->form->getHTML());
442 return true;
443 }

References initFormSearch(), and setSubTabs().

Referenced by performSearch(), reset(), and showSavedResults().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toUnixTime()

ilAdvancedSearchGUI::toUnixTime (   $date,
  $time = array() 
)
private

convert input array to unix time

@access private

Parameters

Definition at line 1071 of file class.ilAdvancedSearchGUI.php.

1072 {
1073 return mktime($time['h'], $time['m'], 0, $date['m'], $date['d'], $date['y']);
1074 }
$time
Definition: cron.php:21

References $time.

Field Documentation

◆ $fields

ilAdvancedSearchGUI::$fields = array()
protected

Definition at line 50 of file class.ilAdvancedSearchGUI.php.

◆ $last_section

ilAdvancedSearchGUI::$last_section = 'adv_search'
protected

Definition at line 48 of file class.ilAdvancedSearchGUI.php.

◆ $options

ilAdvancedSearchGUI::$options = array()
private

array of all options select boxes,'and' 'or' and query strings @access public

Definition at line 58 of file class.ilAdvancedSearchGUI.php.

Referenced by __getFilterSelect(), and initAdvancedMetaDataForm().

◆ $tabs_gui

ilAdvancedSearchGUI::$tabs_gui
protected

Definition at line 60 of file class.ilAdvancedSearchGUI.php.

◆ TYPE_ADV_MD

const ilAdvancedSearchGUI::TYPE_ADV_MD = 2

Definition at line 46 of file class.ilAdvancedSearchGUI.php.

Referenced by executeCommand(), and initSearchType().

◆ TYPE_LOM

const ilAdvancedSearchGUI::TYPE_LOM = 1

Definition at line 45 of file class.ilAdvancedSearchGUI.php.

Referenced by initSearchType().


The documentation for this class was generated from the following file: