ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilAdvancedSearchGUI Class Reference
+ Inheritance diagram for ilAdvancedSearchGUI:
+ Collaboration diagram for ilAdvancedSearchGUI:

Public Member Functions

 ilAdvancedSearchGUI ()
 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
 ilSearchBaseGUI ()
 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...
 
 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...
 

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
 
 $settings = null
 
 $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...
 

Protected Attributes

 $last_section = 'adv_search'
 
 $fields = array()
 
 $tabs_gui
 
- Protected Attributes inherited from ilSearchBaseGUI
 $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.

Member Function Documentation

◆ __getFilterSelect()

ilAdvancedSearchGUI::__getFilterSelect ( )

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

1055 {
1056 $options = array('all' => $this->lng->txt('search_any'),
1057 'crs' => $this->lng->txt('objs_crs'),
1058 'lms' => $this->lng->txt('learning_resources'),
1059 'glo' => $this->lng->txt('objs_glo'),
1060 'mep' => $this->lng->txt('objs_mep'),
1061 'tst' => $this->lng->txt('search_tst_svy'),
1062 'file'=> $this->lng->txt('objs_file'),
1063 'webr' => $this->lng->txt('objs_webr'));
1064
1065
1066 return ilUtil::formSelect($this->options['type'],'search_adv[type]',$options,false,true);
1067 }
$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 847 of file class.ilAdvancedSearchGUI.php.

848 {
849 // Return if 'any'
850 if(!$this->options['lom_purpose'])
851 {
852 return false;
853 }
854 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
855 include_once 'Services/Search/classes/class.ilQueryParser.php';
856
857
859 $meta_search->setFilter($this->filter);
860 $meta_search->setMode('classification');
861 $meta_search->setOptions($this->options);
862 $res =& $meta_search->performSearch();
863
864 return $res;
865 }
static _getAdvancedSearchInstance($query_parser)
get reference of ilFulltextAdvancedSearch

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 566 of file class.ilAdvancedSearchGUI.php.

567 {
568 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
569 include_once 'Services/Search/classes/class.ilQueryParser.php';
570 include_once 'Services/Search/classes/class.ilSearchResult.php';
571
572 if(!$this->options['lom_content'])
573 {
574 return false;
575 }
576
577 $res =& new ilSearchResult();
578
579 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_content']));
580 #$query_parser->setCombination($this->options['content_ao']);
581 $query_parser->setCombination(QP_COMBINATION_OR);
582 $query_parser->parse();
583
584 if($this->options['type'] == 'all' or $this->options['type'] == 'lms')
585 {
586 // LM content search
587 $lm_search =& ilObjectSearchFactory::_getLMContentSearchInstance($query_parser);
588 $res_cont =& $lm_search->performSearch();
589 $res->mergeEntries($res_cont);
590 }
591 if($this->options['type'] == 'all' or $this->options['type'] == 'tst')
592 {
593 $tst_search =& ilObjectSearchFactory::_getTestSearchInstance($query_parser);
594 $res_tes =& $tst_search->performSearch();
595 $res->mergeEntries($res_tes);
596 }
597 if($this->options['type'] == 'all' or $this->options['type'] == 'mep')
598 {
599 $med_search =& ilObjectSearchFactory::_getMediaPoolSearchInstance($query_parser);
600 $res_med =& $med_search->performSearch();
601 $res->mergeEntries($res_med);
602 }
603 if($this->options['type'] == 'all' or $this->options['type'] == 'glo')
604 {
606 $res_glo =& $glo_search->performSearch();
607 $res->mergeEntries($res_glo);
608 }
609 if($this->options['type'] == 'all' or $this->options['type'] == 'webr')
610 {
611 $web_search =& ilObjectSearchFactory::_getWebresourceSearchInstance($query_parser);
612 $res_web =& $web_search->performSearch();
613 $res->mergeEntries($res_web);
614 }
615 if($tit_res = $this->__performTitleSearch())
616 {
617 $res->mergeEntries($tit_res);
618 }
619
620 return $res;
621 }
const QP_COMBINATION_OR
_getWebresourceSearchInstance($query_parser)
get reference of ilFulltextWebresourceSearch
static _getMediaPoolSearchInstance($query_parser)
get reference of ilFulltextMediapoolSearch
static _getLMContentSearchInstance($query_parser)
get reference of ilFulltextLMContentSearch
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 728 of file class.ilAdvancedSearchGUI.php.

729 {
730 if(!strlen($this->options['lom_role']))
731 {
732 return false;
733 }
734 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
735 include_once 'Services/Search/classes/class.ilQueryParser.php';
736
737
739 $meta_search->setFilter($this->filter);
740 $meta_search->setMode('contribute');
741 $meta_search->setOptions($this->options);
742 $res =& $meta_search->performSearch();
743
744 return $res;
745 }

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 800 of file class.ilAdvancedSearchGUI.php.

801 {
802 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
803 include_once 'Services/Search/classes/class.ilQueryParser.php';
804
805
807 $meta_search->setFilter($this->filter);
808 $meta_search->setMode('educational');
809 $meta_search->setOptions($this->options);
810 $res =& $meta_search->performSearch();
811
812 return $res;
813 }

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 746 of file class.ilAdvancedSearchGUI.php.

747 {
748 // Return if 'any'
749 if(!$this->options['lom_role_entry'])
750 {
751 return false;
752 }
753
754 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
755 include_once 'Services/Search/classes/class.ilQueryParser.php';
756
757 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_role_entry']));
758 #$query_parser->setCombination($this->options['entity_ao']);
759 $query_parser->setCombination(QP_COMBINATION_OR);
760 $query_parser->parse();
761
762 $meta_search =& ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
763 $meta_search->setFilter($this->filter);
764 $meta_search->setMode('entity');
765 $meta_search->setOptions($this->options);
766 $res =& $meta_search->performSearch();
767
768 return $res;
769 }

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 786 of file class.ilAdvancedSearchGUI.php.

787 {
788 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
789 include_once 'Services/Search/classes/class.ilQueryParser.php';
790
791
793 $meta_search->setFilter($this->filter);
794 $meta_search->setMode('format');
795 $meta_search->setOptions($this->options);
796 $res =& $meta_search->performSearch();
797
798 return $res;
799 }

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 657 of file class.ilAdvancedSearchGUI.php.

658 {
659 if(!$this->options['lom_coverage'] and !$this->options['lom_structure'])
660 {
661 return false;
662 }
663
664 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
665 include_once 'Services/Search/classes/class.ilQueryParser.php';
666
667 if($this->options['lom_coverage'])
668 {
669 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_coverage']));
670 #$query_parser->setCombination($this->options['coverage_ao']);
671 $query_parser->setCombination(QP_COMBINATION_OR);
672 $query_parser->parse();
673 }
674 else
675 {
676 $query_parser = new ilQueryParser('');
677 }
678 $meta_search =& ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
679 $meta_search->setFilter($this->filter);
680 $meta_search->setMode('general');
681 $meta_search->setOptions($this->options);
682 $res =& $meta_search->performSearch();
683
684 return $res;
685 }

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 942 of file class.ilAdvancedSearchGUI.php.

943 {
944 // Return if 'any'
945 if(!$this->options['lom_keyword'])
946 {
947 return false;
948 }
949 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
950 include_once 'Services/Search/classes/class.ilQueryParser.php';
951
952 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_keyword']));
953 #$query_parser->setCombination($this->options['keyword_ao']);
954 $query_parser->setCombination(QP_COMBINATION_OR);
955 $query_parser->parse();
956
957 $meta_search =& ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
958 $meta_search->setFilter($this->filter);
959 $meta_search->setMode('keyword');
960 $meta_search->setOptions($this->options);
961 $res =& $meta_search->performSearch();
962
963 return $res;
964 }

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 710 of file class.ilAdvancedSearchGUI.php.

711 {
712 if(!$this->options['lom_language'])
713 {
714 return false;
715 }
716 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
717 include_once 'Services/Search/classes/class.ilQueryParser.php';
718
719
721 $meta_search->setFilter($this->filter);
722 $meta_search->setMode('language');
723 $meta_search->setOptions($this->options);
724 $res =& $meta_search->performSearch();
725
726 return $res;
727 }

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 687 of file class.ilAdvancedSearchGUI.php.

688 {
689 // Return if 'any'
690 if(!$this->options['lom_status'] and !$this->options['lom_version'])
691 {
692 return false;
693 }
694 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
695 include_once 'Services/Search/classes/class.ilQueryParser.php';
696
697 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_version']));
698 #$query_parser->setCombination($this->options['version_ao']);
699 $query_parser->setCombination(QP_COMBINATION_OR);
700 $query_parser->parse();
701
702 $meta_search =& ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
703 $meta_search->setFilter($this->filter);
704 $meta_search->setMode('lifecycle');
705 $meta_search->setOptions($this->options);
706 $res =& $meta_search->performSearch();
707
708 return $res;
709 }

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 772 of file class.ilAdvancedSearchGUI.php.

773 {
774 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
775 include_once 'Services/Search/classes/class.ilQueryParser.php';
776
777
779 $meta_search->setFilter($this->filter);
780 $meta_search->setMode('requirement');
781 $meta_search->setOptions($this->options);
782 $res =& $meta_search->performSearch();
783
784 return $res;
785 }

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 828 of file class.ilAdvancedSearchGUI.php.

829 {
830 if(!$this->options['lom_copyright'] and !$this->options['lom_costs'])
831 {
832 return false;
833 }
834 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
835 include_once 'Services/Search/classes/class.ilQueryParser.php';
836
837
839 $meta_search->setFilter($this->filter);
840 $meta_search->setMode('rights');
841 $meta_search->setOptions($this->options);
842 $res =& $meta_search->performSearch();
843
844 return $res;
845 }

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 867 of file class.ilAdvancedSearchGUI.php.

868 {
869 // Return if 'any'
870 if(!$this->options['lom_taxon'])
871 {
872 return false;
873 }
874 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
875 include_once 'Services/Search/classes/class.ilQueryParser.php';
876
877 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_taxon']));
878 $query_parser->setCombination(QP_COMBINATION_OR);
879 $query_parser->parse();
880
881 $meta_search =& ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
882 $meta_search->setFilter($this->filter);
883 $meta_search->setMode('taxon');
884 $meta_search->setOptions($this->options);
885 $res =& $meta_search->performSearch();
886
887 return $res;
888 }

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 624 of file class.ilAdvancedSearchGUI.php.

625 {
626 if(!$this->options['lom_content'])
627 {
628 return false;
629 }
630
631 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
632 include_once 'Services/Search/classes/class.ilQueryParser.php';
633
634 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_content']));
635 #$query_parser->setCombination($this->options['title_ao']);
636 $query_parser->setCombination(QP_COMBINATION_OR);
637 $query_parser->parse();
638 $meta_search =& ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
639
640 $meta_search->setFilter($this->filter);
641 $meta_search->setMode('title_description');
642 $meta_search->setOptions($this->options);
643 $res_tit =& $meta_search->performSearch();
644
645 $meta_search->setMode('keyword_all');
646 $res_key =& $meta_search->performSearch();
647
648 // merge them
649 $res_tit->mergeEntries($res_key);
650
651
652 return $res_tit;
653 }

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 814 of file class.ilAdvancedSearchGUI.php.

815 {
816 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
817 include_once 'Services/Search/classes/class.ilQueryParser.php';
818
819
821 $meta_search->setFilter($this->filter);
822 $meta_search->setMode('typical_age_range');
823 $meta_search->setOptions($this->options);
824 $res =& $meta_search->performSearch();
825
826 return $res;
827 }

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 966 of file class.ilAdvancedSearchGUI.php.

967 {
968 if(isset($_POST['cmd']['performSearch']))
969 {
970 $this->options = $_SESSION['search_adv'] = $_POST['query'];
971 }
972 elseif(isset($_POST['cmd']['performAdvMDSearch']))
973 {
974 $this->options = $_SESSION['search_adv_md'] = $_POST;
975 }
976 else
977 {
978 $this->options = $_SESSION['search_adv'];
979 }
980
981 $_POST['result'] = $_POST['id'];
982
983 $this->filter = array();
984
985 $this->options['type'] = 'all';
986 switch($this->options['type'])
987 {
988 case 'cat':
989 $this->filter[] = 'cat';
990 break;
991
992 case 'webr':
993 $this->filter[] = 'webr';
994 break;
995
996 case 'lms':
997 $this->filter[] = 'lm';
998 $this->filter[] = 'dbk';
999 $this->filter[] = 'pg';
1000 $this->filter[] = 'st';
1001 $this->filter[] = 'sahs';
1002 $this->filter[] = 'htlm';
1003 break;
1004
1005 case 'glo':
1006 $this->filter[] = 'glo';
1007 break;
1008
1009 case 'tst':
1010 $this->filter[] = 'tst';
1011 $this->filter[] = 'svy';
1012 $this->filter[] = 'qpl';
1013 $this->filter[] = 'spl';
1014 break;
1015
1016 case 'mep':
1017 $this->filter[] = 'mep';
1018 break;
1019
1020 case 'crs':
1021 $this->filter[] = 'crs';
1022 break;
1023
1024 case 'file':
1025 $this->filter[] = 'file';
1026 break;
1027
1028 case 'adv_all':
1029 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
1031 break;
1032
1033 case 'all':
1034 default:
1035 $this->filter[] = 'webr';
1036 $this->filter[] = 'crs';
1037 $this->filter[] = 'mep';
1038 $this->filter[] = 'tst';
1039 $this->filter[] = 'svy';
1040 $this->filter[] = 'qpl';
1041 $this->filter[] = 'spl';
1042 $this->filter[] = 'glo';
1043 $this->filter[] = 'lm';
1044 $this->filter[] = 'dbk';
1045 $this->filter[] = 'pg';
1046 $this->filter[] = 'st';
1047 $this->filter[] = 'sahs';
1048 $this->filter[] = 'htlm';
1049 $this->filter[] = 'file';
1050 }
1051 return true;
1052 }
static _getActivatedObjTypes()
get activated obj types
$_POST['username']
Definition: cron.php:12
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

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

Referenced by ilAdvancedSearchGUI().

+ 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 1070 of file class.ilAdvancedSearchGUI.php.

1071 {
1072 if($this->stored == false)
1073 {
1074 $res->mergeEntries($new_res);
1075 $this->stored = true;
1076
1077 return true;
1078 }
1079 else
1080 {
1081 $res->intersectEntries($new_res);
1082 return true;
1083 }
1084 }

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 {
99
100 case 'ilobjectcopygui':
101 $this->prepareOutput();
102
103 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
104 $cp = new ilObjectCopyGUI($this);
105 $this->ctrl->forwardCommand($cp);
106 break;
107
108 default:
109 $this->initUserSearchCache();
110 if(!$cmd)
111 {
112 switch($_SESSION['search_last_sub_section'])
113 {
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.
$cmd
Definition: sahs_server.php:35

References $_SESSION, $cmd, 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:

◆ ilAdvancedSearchGUI()

ilAdvancedSearchGUI::ilAdvancedSearchGUI ( )

Constructor @access public.

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

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

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

+ Here is the call graph for this function:

◆ initAdvancedMetaDataForm()

ilAdvancedSearchGUI::initAdvancedMetaDataForm ( )
protected

@access protected

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

293 {
294 if(is_object($this->form))
295 {
296 return $this->form;
297 }
298
299 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
300 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
301 $this->form = new ilPropertyFormGUI();
302 $this->form->setFormAction($this->ctrl->getFormAction($this,'performAdvMDSearch'));
303 $this->form->setTitle($this->lng->txt('adv_md_search_title'));
304 $this->form->addCommandButton('performAdvMDSearch',$this->lng->txt('search'));
305 #$this->form->setSubformMode('right');
306
307 $content = new ilTextInputGUI($this->lng->txt('meta_title').'/'.
308 $this->lng->txt('meta_keyword').'/'.
309 $this->lng->txt('meta_description'),'title');
310 $content->setValue($this->options['title']);
311 $content->setSize(30);
312 $content->setMaxLength(255);
313// $content->setSubformMode('right');
314 $group = new ilRadioGroupInputGUI('','title_ao');
315 $group->setValue($this->options['title_ao']);
316 $radio_option = new ilRadioOption($this->lng->txt("search_any_word"),0);
317 $group->addOption($radio_option);
318 $radio_option = new ilRadioOption($this->lng->txt("search_all_words"),1);
319 $group->addOption($radio_option);
320 $content->addSubItem($group);
321 $this->form->addItem($content);
322
323 $type = new ilSelectInputGUI($this->lng->txt('type'),'type');
324 $options['adv_all'] = $this->lng->txt('search_any');
325 foreach(ilAdvancedMDRecord::_getActivatedObjTypes() as $obj_type)
326 {
327 $options[$obj_type] = $this->lng->txt('objs_'.$obj_type);
328 }
329 $type->setOptions($options);
330 $type->setValue($this->options['type']);
331 $this->form->addItem($type);
332
333 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
335 $record_gui->setPropertyForm($this->form);
336 $record_gui->setSearchValues($this->options);
337 $record_gui->parse();
338 }
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.

References $options, 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 431 of file class.ilAdvancedSearchGUI.php.

432 {
433 global $tree;
434
435 include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
436
437 $this->form = new ilPropertyFormGUI();
438 $this->form->setFormAction($this->ctrl->getFormAction($this,'performSearch'));
439 $this->form->setTitle($this->lng->txt('search_advanced'));
440 $this->form->addCommandButton('performSearch',$this->lng->txt('search'));
441 $this->form->addCommandButton('reset',$this->lng->txt('reset'));
442
443 foreach($this->fields->getActiveSections() as $definition)
444 {
445 if($definition['name'] != 'default')
446 {
448 $section->setTitle($definition['name']);
449 $this->form->addItem($section);
450 }
451
452 foreach($definition['fields'] as $field_name)
453 {
454 if(is_object($element = $this->fields->getFormElement($this->search_cache->getQuery(),$field_name,$this->form)))
455 {
456 $this->form->addItem($element);
457 }
458 }
459 }
460 return true;
461 }
$section
Definition: Utf8Test.php:84
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 1149 of file class.ilAdvancedSearchGUI.php.

1150 {
1151 if($type == self::TYPE_LOM)
1152 {
1153 $_SESSION['search_last_sub_section'] = self::TYPE_LOM;
1154 $this->search_cache->switchSearchType(ilUserSearchCache::ADVANCED_SEARCH);
1155 }
1156 else
1157 {
1158 $_SESSION['search_last_sub_section'] = self::TYPE_ADV_MD;
1159 $this->search_cache->switchSearchType(ilUserSearchCache::ADVANCED_MD_SEARCH);
1160 }
1161 }

References $_SESSION, 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 1092 of file class.ilAdvancedSearchGUI.php.

1093 {
1094 global $ilUser;
1095
1096 include_once('Services/Search/classes/class.ilUserSearchCache.php');
1097 $this->search_cache = ilUserSearchCache::_getInstance($ilUser->getId());
1098 $this->search_cache->switchSearchType(ilUserSearchCache::ADVANCED_SEARCH);
1099 if($_GET['page_number'])
1100 {
1101 $this->search_cache->setResultPageNumber((int) $_GET['page_number']);
1102 }
1103 if($_POST['cmd']['performSearch'])
1104 {
1105 $this->search_cache->setQuery(ilUtil::stripSlashes($_POST['query']['lomContent']));
1106 $this->search_cache->save();
1107 }
1108 }
$_GET["client_id"]
static _getInstance($a_usr_id)
Get singleton instance.
global $ilUser
Definition: imgupload.php:15

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 345 of file class.ilAdvancedSearchGUI.php.

346 {
347 global $ilUser;
348
349 $this->initSearchType(self::TYPE_ADV_MD);
350 if(!isset($_GET['page_number']) and $this->search_mode != 'in_results' )
351 {
352 unset($_SESSION['adv_max_page']);
353 $this->search_cache->delete();
354 }
355
356 include_once 'Services/Search/classes/class.ilSearchResult.php';
357 $res =& new ilSearchResult();
358
359 if($res_tit =& $this->__performTitleSearch())
360 {
361 $this->__storeEntries($res,$res_tit);
362 }
363 $this->searchAdvancedMD($res);
364
365 if($this->search_mode == 'in_results')
366 {
367 include_once 'Services/Search/classes/class.ilSearchResult.php';
368
369 $old_result_obj = new ilSearchResult($ilUser->getId());
370 $old_result_obj->read(ADVANCED_MD_SEARCH);
371
372 $res->diffEntriesFromResult($old_result_obj);
373 }
374
375
376 $res->filter($this->getRootNode(),true);
377 $res->save();
378 $this->showAdvMDSearch();
379
380 if(!count($res->getResults()))
381 {
382 ilUtil::sendInfo($this->lng->txt('search_no_match'));
383 }
384
385 if($res->isLimitReached())
386 {
387 #$message = sprintf($this->lng->txt('search_limit_reached'),$this->settings->getMaxHits());
388 #ilUtil::sendInfo($message);
389 }
390
391 $this->addPager($res,'adv_max_page');
392
393 include_once './Services/Search/classes/class.ilSearchResultPresentation.php';
395 $presentation->setResults($res->getResultsForPresentation());
396 $presentation->setPreviousNext($this->prev_link, $this->next_link);
397
398 if($presentation->render())
399 {
400 $this->tpl->setVariable('RESULTS',$presentation->getHTML(true));
401 }
402 return true;
403
404 }
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 {
176 unset($_SESSION['adv_max_page']);
177 $this->search_cache->deleteCachedEntries();
178 }
179
180 if(isset($_POST['query']))
181 {
182 $this->search_cache->setQuery($_POST['query']);
183 }
184
185
186 include_once 'Services/Search/classes/class.ilSearchResult.php';
187 $res =& new ilSearchResult();
188
189 if($res_con =& $this->__performContentSearch())
190 {
191 $this->__storeEntries($res,$res_con);
192 }
193 if($res_lan =& $this->__performLanguageSearch())
194 {
195 $this->__storeEntries($res,$res_lan);
196 }
197 if($res_gen =& $this->__performGeneralSearch())
198 {
199 $this->__storeEntries($res,$res_gen);
200 }
201 if($res_lif =& $this->__performLifecycleSearch())
202 {
203 $this->__storeEntries($res,$res_lif);
204 }
205 if($res_con =& $this->__performContributeSearch())
206 {
207 $this->__storeEntries($res,$res_con);
208 }
209 if($res_ent =& $this->__performEntitySearch())
210 {
211 $this->__storeEntries($res,$res_ent);
212 }
213 if($res_req =& $this->__performRequirementSearch())
214 {
215 $this->__storeEntries($res,$res_req);
216 }
217 if($res_for =& $this->__performFormatSearch())
218 {
219 $this->__storeEntries($res,$res_for);
220 }
221 if($res_edu =& $this->__performEducationalSearch())
222 {
223 $this->__storeEntries($res,$res_edu);
224 }
225 if($res_typ =& $this->__performTypicalAgeRangeSearch())
226 {
227 $this->__storeEntries($res,$res_typ);
228 }
229 if($res_rig =& $this->__performRightsSearch())
230 {
231 $this->__storeEntries($res,$res_rig);
232 }
233 if($res_cla =& $this->__performClassificationSearch())
234 {
235 $this->__storeEntries($res,$res_cla);
236 }
237 if($res_tax =& $this->__performTaxonSearch())
238 {
239 $this->__storeEntries($res,$res_tax);
240 }
241 if($res_key =& $this->__performKeywordSearch())
242 {
243 $this->__storeEntries($res,$res_key);
244 }
245
246 $this->searchAdvancedMD($res);
247
248 if($this->search_mode == 'in_results')
249 {
250 include_once 'Services/Search/classes/class.ilSearchResult.php';
251
252 $old_result_obj = new ilSearchResult($ilUser->getId());
253 $old_result_obj->read(ADVANCED_MD_SEARCH);
254
255 $res->diffEntriesFromResult($old_result_obj);
256 }
257
258 $res->filter($this->getRootNode(), (ilSearchSettings::getInstance()->getDefaultOperator() == ilSearchSettings::OPERATOR_AND));
259 $res->save();
260 $this->showSearch();
261
262 if(!count($res->getResults()))
263 {
264 ilUtil::sendInfo($this->lng->txt('search_no_match'));
265 }
266
267 if($res->isLimitReached())
268 {
269 #$message = sprintf($this->lng->txt('search_limit_reached'),$this->settings->getMaxHits());
270 #ilUtil::sendInfo($message);
271 }
272
273 $this->addPager($res,'adv_max_page');
274
275 include_once './Services/Search/classes/class.ilSearchResultPresentation.php';
277 $presentation->setResults($res->getResultsForPresentation());
278 $presentation->setPreviousNext($this->prev_link, $this->next_link);
279
280 if($presentation->render())
281 {
282 $this->tpl->setVariable('RESULTS',$presentation->getHTML(true));
283 }
284 return true;
285 }

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 479 of file class.ilAdvancedSearchGUI.php.

480 {
481 global $ilTabs, $ilHelp;
482
483 parent::prepareOutput();
484
485 $ilHelp->setScreenIdComponent("src");
486
487 $ilTabs->addTab("search", $this->lng->txt("search"),
488 $this->ctrl->getLinkTargetByClass('ilsearchgui'));
489 $ilTabs->addTab("adv_search", $this->lng->txt("search_advanced"),
490 $this->ctrl->getLinkTarget($this));
491 $ilTabs->activateTab("adv_search");
492 }

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 897 of file class.ilAdvancedSearchGUI.php.

898 {
899 $this->initFormSearch();
900
901 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
902 foreach(array_keys($this->options) as $key)
903 {
904 if(substr($key,0,3) != 'adv')
905 {
906 continue;
907 }
908
909 // :TODO: ?
910 if(!$key)
911 {
912 continue;
913 }
914
915 $field_id = substr($key,4);
917
918 $field_form = ilADTFactory::getInstance()->getSearchBridgeForDefinitionInstance($field->getADTDefinition(), true, false);
919 $field_form->setElementId("query[".$key."]");
920 $field_form->setForm($this->form);
921
922 // reload search values
923 $field_form->importFromPost($this->options);
924 $field_form->validate();
925
926 $parser_value = $field->getSearchQueryParserValue($field_form);
927
928 include_once 'Services/Search/classes/class.ilQueryParser.php';
929 include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
930 $adv_md_search = ilObjectSearchFactory::_getAdvancedMDSearchInstance(new ilQueryParser($parser_value));
931 $adv_md_search->setFilter($this->filter);
932 $adv_md_search->setDefinition($field);
933 $adv_md_search->setSearchElement($field_form);
934 $res_field = $adv_md_search->performSearch();
935 if($res_field instanceof ilSearchResult)
936 {
937 $this->__storeEntries($res,$res_field);
938 }
939 }
940 }
static getInstance()
Get singleton.
static getInstance($a_field_id, $a_type=null)
Get definition instance by type.
static _getAdvancedMDSearchInstance($query_parser)
get advanced meta data search instance

References $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 1116 of file class.ilAdvancedSearchGUI.php.

1117 {
1118 global $ilTabs;
1119
1120 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
1122 {
1123 return true;
1124 }
1125 $ilTabs->addSubTabTarget('search_lom',$this->ctrl->getLinkTarget($this,'showSavedResults'));
1126 #$ilTabs->addSubTabTarget('search_adv_md',$this->ctrl->getLinkTarget($this,'showSavedAdvMDResults'));
1127
1128 }
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 412 of file class.ilAdvancedSearchGUI.php.

413 {
414 if(isset($_SESSION['search_adv_md']))
415 {
416 $this->options = $_SESSION['search_adv_md'];
417 }
418 $this->setSubTabs();
419 $this->tabs_gui->setSubTabActive('search_adv_md');
420
421 $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.advanced_adv_search.html','Services/Search');
422
424 $this->tpl->setVariable('SEARCH_FORM',$this->form->getHTML());
425 return true;
426 }
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 501 of file class.ilAdvancedSearchGUI.php.

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

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 534 of file class.ilAdvancedSearchGUI.php.

535 {
536 global $ilUser;
537
538 // Read old result sets
539 include_once 'Services/Search/classes/class.ilSearchResult.php';
540
541 $this->initSearchType(self::TYPE_LOM);
542 $result_obj = new ilSearchResult($ilUser->getId());
543 $result_obj->read(ADVANCED_SEARCH);
544
545 $this->showSearch();
546
547 // Show them
548 if(count($result_obj->getResults()))
549 {
550 $this->addPager($result_obj,'adv_max_page');
551
552 include_once './Services/Search/classes/class.ilSearchResultPresentation.php';
554 $presentation->setResults($result_obj->getResultsForPresentation());
555 $presentation->setPreviousNext($this->prev_link, $this->next_link);
556
557 if($presentation->render())
558 {
559 $this->tpl->setVariable('RESULTS',$presentation->getHTML(true));
560 }
561 }
562
563 return true;
564 }
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 465 of file class.ilAdvancedSearchGUI.php.

466 {
467 global $ilLocator;
468
469 $this->setSubTabs();
470 $this->tabs_gui->setSubTabActive('search_lom');
471
472 $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.advanced_search.html','Services/Search');
473
474 $this->initFormSearch();
475 $this->tpl->setVariable('SEARCH_FORM',$this->form->getHTML());
476 return true;
477 }

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 1137 of file class.ilAdvancedSearchGUI.php.

1138 {
1139 return mktime($time['h'],$time['m'],0,$date['m'],$date['d'],$date['y']);
1140 }

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: