ILIAS  release_8 Revision v8.24
ilAdvancedSearchGUI Class Reference
+ Inheritance diagram for ilAdvancedSearchGUI:
+ Collaboration diagram for ilAdvancedSearchGUI:

Public Member Functions

 __construct ()
 
 getRootNode ()
 
 executeCommand ()
 
 reset ()
 
 searchInResults ()
 
 performSearch ()
 
 showAdvMDSearch ()
 
 showSearch ()
 
 prepareOutput ()
 
 showSavedResults ()
 
 __performContentSearch ()
 
 __performTitleSearch ()
 
 __performGeneralSearch ()
 
 __performLifecycleSearch ()
 
 __performLanguageSearch ()
 
 __performContributeSearch ()
 
 __performEntitySearch ()
 
 __performRequirementSearch ()
 
 __performFormatSearch ()
 
 __performEducationalSearch ()
 
 __performTypicalAgeRangeSearch ()
 
 __performRightsSearch ()
 
 __performClassificationSearch ()
 
 __performTaxonSearch ()
 
 __performKeywordSearch ()
 
 __setSearchOptions ()
 
 __getFilterSelect ()
 
 __storeEntries (ilSearchResult $res, ilSearchResult $new_res)
 
 setSubTabs ()
 
- Public Member Functions inherited from ilSearchBaseGUI
 __construct ()
 
 prepareOutput ()
 
 initStandardSearchForm (int $a_mode)
 
 getSearchAreaForm ()
 
 handleCommand (string $a_cmd)
 
 addToDeskObject ()
 Add desktop item @access public. More...
 
 removeFromDeskObject ()
 Remove from desktop @access public. More...
 
 delete ()
 Show delete confirmation. More...
 
 cancelDelete ()
 Cancel delete. More...
 
 cancelObject ()
 
 cancelMoveLinkObject ()
 
 performDelete ()
 
 cut ()
 
 link ()
 
 paste ()
 
 showLinkIntoMultipleObjectsTree ()
 
 showPasteTree ()
 
 showMoveIntoObjectTree ()
 
 performPasteIntoMultipleObjects ()
 
 clear ()
 clear clipboard More...
 
 enableAdministrationPanel ()
 
 disableAdministrationPanel ()
 
 keepObjectsInClipboardObject ()
 
 addLocator ()
 
 autoComplete ()
 
 addToDeskObject ()
 Add desktop item @access public. More...
 
 removeFromDeskObject ()
 Remove from desktop @access public. More...
 
 delete ()
 Show delete confirmation. More...
 
 cancelDelete ()
 Cancel delete. More...
 
 performDelete ()
 
 cut ()
 
 showLinkIntoMultipleObjectsTree ()
 
 showMoveIntoObjectTree ()
 
 showPasteTree ()
 
 performPasteIntoMultipleObjects ()
 
 paste ()
 
 clear ()
 clear clipboard More...
 
 enableAdministrationPanel ()
 
 disableAdministrationPanel ()
 
 cancelMoveLinkObject ()
 
 keepObjectsInClipboardObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

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
 

Protected Member Functions

 remoteSearch ()
 
 initAdvancedMetaDataForm ()
 
 performAdvMDSearch ()
 
 initFormSearch ()
 
- Protected Member Functions inherited from ilSearchBaseGUI
 initPageNumberFromQuery ()
 
 addPager ($result, string $a_session_key)
 
 buildSearchAreaPath (int $a_root_node)
 
 getCreationDateForm ()
 
 getSearchCache ()
 
 loadCreationFilter ()
 

Protected Attributes

string $last_section = 'adv_search'
 
ilLuceneAdvancedSearchFields $fields
 
array $filter = array()
 
ilTabsGUI $tabs_gui
 
ilHelpGUI $help_gui
 
- Protected Attributes inherited from ilSearchBaseGUI
ilUserSearchCache $search_cache
 
string $search_mode = ''
 
ilSearchSettings $settings
 
ilPropertyFormGUI $form = null
 
ClipboardManager $clipboard
 
ViewManager $container_view_manager
 
ilFavouritesManager $favourites
 
ilCtrl $ctrl
 
ILIAS $ilias
 
ilLanguage $lng
 
ilGlobalTemplateInterface $tpl
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilTree $tree
 
GlobalHttpState $http
 
Factory $refinery
 
ilLogger $logger
 
string $prev_link = ''
 
string $next_link = ''
 

Private Member Functions

 showSavedAdvMDResults ()
 
 searchAdvancedMD (ilSearchResult $res)
 
 initUserSearchCache ()
 
 toUnixTime (array $date, array $time=array())
 
 initSearchType (int $type)
 
 getQueryFromPost ()
 

Private Attributes

bool $stored = false
 
array $options = array()
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilAdvancedSearchGUI::__construct ( )

Reimplemented from ilSearchBaseGUI.

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

56 {
57 global $DIC;
58
59 $this->tabs_gui = $DIC->tabs();
60 $this->help_gui = $DIC->help();
61
62
64
65 $this->lng->loadLanguageModule('meta');
67
68 $this->__setSearchOptions();
69 }
global $DIC
Definition: feed.php:28
$errors fields
Definition: imgupload.php:67
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), __setSearchOptions(), fields, ilLuceneAdvancedSearchFields\getInstance(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ __getFilterSelect()

ilAdvancedSearchGUI::__getFilterSelect ( )

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

900 : string
901 {
902 $options = array('all' => $this->lng->txt('search_any'),
903 'crs' => $this->lng->txt('objs_crs'),
904 'lms' => $this->lng->txt('obj_lrss'),
905 'glo' => $this->lng->txt('objs_glo'),
906 'mep' => $this->lng->txt('objs_mep'),
907 'tst' => $this->lng->txt('search_tst_svy'),
908 'file' => $this->lng->txt('objs_file'),
909 'webr' => $this->lng->txt('objs_webr'),
910 'sess' => $this->lng->txt('objs_sess')
911 );
912
913
914 return ilLegacyFormElementsUtil::formSelect($this->options['type'], 'search_adv[type]', $options, false, true);
915 }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.

References $options, ilLegacyFormElementsUtil\formSelect(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ __performClassificationSearch()

ilAdvancedSearchGUI::__performClassificationSearch ( )

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

717 {
718 // Return if 'any'
719 if (!($this->options['lom_purpose'] ?? null)) {
720 return null;
721 }
722
723
725 $meta_search->setFilter($this->filter);
726 $meta_search->setMode('classification');
727 $meta_search->setOptions($this->options);
728 $res = $meta_search->performSearch();
729
730 return $res;
731 }
static _getAdvancedSearchInstance(ilQueryParser $query_parser)
$res
Definition: ltiservices.php:69

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), and ILIAS\UI\examples\Symbol\Glyph\Filter\filter().

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

470 {
471 if (!($this->options['lom_content'] ?? null)) {
472 return null;
473 }
474
475 $res = new ilSearchResult();
476
477 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_content']));
478 #$query_parser->setCombination($this->options['content_ao']);
479 $query_parser->setCombination(ilQueryParser::QP_COMBINATION_OR);
480 $query_parser->parse();
481
482 if (!isset($this->options['type'])) {
483 if ($tit_res = $this->__performTitleSearch()) {
484 $res->mergeEntries($tit_res);
485 }
486
487 return $res;
488 }
489
490 if ($this->options['type'] == 'all' or $this->options['type'] == 'lms') {
491 // LM content search
492 $lm_search = ilObjectSearchFactory::_getLMContentSearchInstance($query_parser);
493 $res_cont = $lm_search->performSearch();
494 $res->mergeEntries($res_cont);
495 }
496 if ($this->options['type'] == 'all' or $this->options['type'] == 'tst') {
497 $tst_search = ilObjectSearchFactory::_getTestSearchInstance($query_parser);
498 $res_tes = $tst_search->performSearch();
499 $res->mergeEntries($res_tes);
500 }
501 if ($this->options['type'] == 'all' or $this->options['type'] == 'mep') {
502 $med_search = ilObjectSearchFactory::_getMediaPoolSearchInstance($query_parser);
503 $res_med = $med_search->performSearch();
504 $res->mergeEntries($res_med);
505 }
506 if ($this->options['type'] == 'all' or $this->options['type'] == 'glo') {
508 $res_glo = $glo_search->performSearch();
509 $res->mergeEntries($res_glo);
510 }
511 if ($this->options['type'] == 'all' or $this->options['type'] == 'webr') {
512 $web_search = ilObjectSearchFactory::_getWebresourceSearchInstance($query_parser);
513 $res_web = $web_search->performSearch();
514 $res->mergeEntries($res_web);
515 }
516 if ($tit_res = $this->__performTitleSearch()) {
517 $res->mergeEntries($tit_res);
518 }
519
520 return $res;
521 }
static _getGlossaryDefinitionSearchInstance(ilQueryParser $query_parser)
static _getWebresourceSearchInstance(ilQueryParser $query_parser)
static _getMediaPoolSearchInstance(ilQueryParser $query_parser)
static _getLMContentSearchInstance(ilQueryParser $query_parser)
static _getTestSearchInstance(ilQueryParser $query_parser)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")

References $res, __performTitleSearch(), ilObjectSearchFactory\_getGlossaryDefinitionSearchInstance(), ilObjectSearchFactory\_getLMContentSearchInstance(), ilObjectSearchFactory\_getMediaPoolSearchInstance(), ilObjectSearchFactory\_getTestSearchInstance(), ilObjectSearchFactory\_getWebresourceSearchInstance(), ilQueryParser\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 619 of file class.ilAdvancedSearchGUI.php.

620 {
621 if (!strlen($this->options['lom_role'] ?? '')) {
622 return null;
623 }
624
625
627 $meta_search->setFilter($this->filter);
628 $meta_search->setMode('contribute');
629 $meta_search->setOptions($this->options);
630 $res = $meta_search->performSearch();
631
632 return $res;
633 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), and ILIAS\UI\examples\Symbol\Glyph\Filter\filter().

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

678 {
680 $meta_search->setFilter($this->filter);
681 $meta_search->setMode('educational');
682 $meta_search->setOptions($this->options);
683 $res = $meta_search->performSearch();
684
685 return $res;
686 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), and ILIAS\UI\examples\Symbol\Glyph\Filter\filter().

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

635 {
636 // Return if 'any'
637 if (!($this->options['lom_role_entry'] ?? null)) {
638 return null;
639 }
640
641
642 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_role_entry']));
643 #$query_parser->setCombination($this->options['entity_ao']);
644 $query_parser->setCombination(ilQueryParser::QP_COMBINATION_OR);
645 $query_parser->parse();
646
647 $meta_search = ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
648 $meta_search->setFilter($this->filter);
649 $meta_search->setMode('entity');
650 $meta_search->setOptions($this->options);
651 $res = $meta_search->performSearch();
652
653 return $res;
654 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), ILIAS\UI\examples\Symbol\Glyph\Filter\filter(), ilQueryParser\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 667 of file class.ilAdvancedSearchGUI.php.

668 {
670 $meta_search->setFilter($this->filter);
671 $meta_search->setMode('format');
672 $meta_search->setOptions($this->options);
673 $res = $meta_search->performSearch();
674
675 return $res;
676 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), and ILIAS\UI\examples\Symbol\Glyph\Filter\filter().

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

555 {
556 if (
557 !($this->options['lom_coverage'] ?? null) and
558 !($this->options['lom_structure'] ?? null)
559 ) {
560 return null;
561 }
562
563
564 if (($this->options['lom_coverage'] ?? null)) {
565 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_coverage']));
566 #$query_parser->setCombination($this->options['coverage_ao']);
567 $query_parser->setCombination(ilQueryParser::QP_COMBINATION_OR);
568 $query_parser->parse();
569 } else {
570 $query_parser = new ilQueryParser('');
571 }
572 $meta_search = ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
573 $meta_search->setFilter($this->filter);
574 $meta_search->setMode('general');
575 $meta_search->setOptions($this->options);
576 $res = $meta_search->performSearch();
577
578 return $res;
579 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), ILIAS\UI\examples\Symbol\Glyph\Filter\filter(), ilQueryParser\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 791 of file class.ilAdvancedSearchGUI.php.

792 {
793 // Return if 'any'
794 if (!($this->options['lom_keyword'] ?? null)) {
795 return null;
796 }
797
798 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_keyword']));
799 $query_parser->setCombination(ilQueryParser::QP_COMBINATION_OR);
800 $query_parser->parse();
801
802 $meta_search = ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
803 $meta_search->setFilter($this->filter);
804 $meta_search->setMode('keyword');
805 $meta_search->setOptions($this->options);
806 $res = $meta_search->performSearch();
807 return $res;
808 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), ILIAS\UI\examples\Symbol\Glyph\Filter\filter(), ilQueryParser\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 604 of file class.ilAdvancedSearchGUI.php.

605 {
606 if (!($this->options['lom_language'] ?? null)) {
607 return null;
608 }
609
610
612 $meta_search->setFilter($this->filter);
613 $meta_search->setMode('language');
614 $meta_search->setOptions($this->options);
615 $res = $meta_search->performSearch();
616
617 return $res;
618 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), and ILIAS\UI\examples\Symbol\Glyph\Filter\filter().

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

582 {
583 // Return if 'any'
584 if (
585 !($this->options['lom_status'] ?? null) and
586 !($this->options['lom_version'] ?? null)
587 ) {
588 return null;
589 }
590
591 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_version']));
592 #$query_parser->setCombination($this->options['version_ao']);
593 $query_parser->setCombination(ilQueryParser::QP_COMBINATION_OR);
594 $query_parser->parse();
595
596 $meta_search = ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
597 $meta_search->setFilter($this->filter);
598 $meta_search->setMode('lifecycle');
599 $meta_search->setOptions($this->options);
600 $res = $meta_search->performSearch();
601
602 return $res;
603 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), ILIAS\UI\examples\Symbol\Glyph\Filter\filter(), ilQueryParser\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 657 of file class.ilAdvancedSearchGUI.php.

658 {
660 $meta_search->setFilter($this->filter);
661 $meta_search->setMode('requirement');
662 $meta_search->setOptions($this->options);
663 $res = $meta_search->performSearch();
664
665 return $res;
666 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), and ILIAS\UI\examples\Symbol\Glyph\Filter\filter().

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

698 {
699 if (
700 !($this->options['lom_copyright'] ?? null) and
701 !($this->options['lom_costs'] ?? null)
702 ) {
703 return null;
704 }
705
706
708 $meta_search->setFilter($this->filter);
709 $meta_search->setMode('rights');
710 $meta_search->setOptions($this->options);
711 $res = $meta_search->performSearch();
712
713 return $res;
714 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), and ILIAS\UI\examples\Symbol\Glyph\Filter\filter().

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

734 {
735 // Return if 'any'
736 if (!($this->options['lom_taxon'] ?? null)) {
737 return null;
738 }
739
740 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_taxon']));
741 $query_parser->setCombination(ilQueryParser::QP_COMBINATION_OR);
742 $query_parser->parse();
743
744 $meta_search = ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
745 $meta_search->setFilter($this->filter);
746 $meta_search->setMode('taxon');
747 $meta_search->setOptions($this->options);
748 $res = $meta_search->performSearch();
749
750 return $res;
751 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), ILIAS\UI\examples\Symbol\Glyph\Filter\filter(), ilQueryParser\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 524 of file class.ilAdvancedSearchGUI.php.

525 {
526 if (!($this->options['lom_content'] ?? null)) {
527 return null;
528 }
529
530
531 $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_content']));
532 #$query_parser->setCombination($this->options['title_ao']);
533 $query_parser->setCombination(ilQueryParser::QP_COMBINATION_OR);
534 $query_parser->parse();
535 $meta_search = ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
536
537 $meta_search->setFilter($this->filter);
538 $meta_search->setMode('title_description');
539 $meta_search->setOptions($this->options);
540 $res_tit = $meta_search->performSearch();
541
542 $meta_search->setMode('keyword_all');
543 $res_key = $meta_search->performSearch();
544
545 // merge them
546 $res_tit->mergeEntries($res_key);
547
548
549 return $res_tit;
550 }

References ilObjectSearchFactory\_getAdvancedSearchInstance(), ILIAS\UI\examples\Symbol\Glyph\Filter\filter(), ilQueryParser\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 687 of file class.ilAdvancedSearchGUI.php.

688 {
690 $meta_search->setFilter($this->filter);
691 $meta_search->setMode('typical_age_range');
692 $meta_search->setOptions($this->options);
693 $res = $meta_search->performSearch();
694
695 return $res;
696 }

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), and ILIAS\UI\examples\Symbol\Glyph\Filter\filter().

Referenced by performSearch().

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

◆ __setSearchOptions()

ilAdvancedSearchGUI::__setSearchOptions ( )

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

810 : bool
811 {
812 $query = $this->getQueryFromPost();
813
814 $post_cmd = (array) ($this->http->request()->getParsedBody()['cmd'] ?? []);
815
816 if (isset($post_cmd['performSearch'])) {
817 $this->options = $query;
818 ilSession::set('search_adv', $this->options);
819 } elseif (isset($post_cmd['performAdvMDSearch'])) {
820 $this->options = (array) $this->http->request()->getParsedBody();
821 ilSession::set('search_adv_md', $this->options);
822 } else {
823 $this->options = ilSession::get('search_adv') ?? [];
824 }
825 $this->filter = array();
826
827 $this->options['type'] = 'all';
828 switch ($this->options['type']) {
829 case 'cat':
830 $this->filter[] = 'cat';
831 break;
832
833 case 'webr':
834 $this->filter[] = 'webr';
835 break;
836
837 case 'lms':
838 $this->filter[] = 'lm';
839 $this->filter[] = 'dbk';
840 $this->filter[] = 'pg';
841 $this->filter[] = 'st';
842 $this->filter[] = 'sahs';
843 $this->filter[] = 'htlm';
844 break;
845
846 case 'glo':
847 $this->filter[] = 'glo';
848 break;
849
850 case 'tst':
851 $this->filter[] = 'tst';
852 $this->filter[] = 'svy';
853 $this->filter[] = 'qpl';
854 $this->filter[] = 'spl';
855 break;
856
857 case 'mep':
858 $this->filter[] = 'mep';
859 $this->filter[] = 'mob';
860 $this->filter[] = 'mpg';
861 break;
862
863 case 'crs':
864 $this->filter[] = 'crs';
865 break;
866
867 case 'file':
868 $this->filter[] = 'file';
869 break;
870
871 case 'adv_all':
873 break;
874
875 case 'all':
876 default:
877 $this->filter[] = 'cat';
878 $this->filter[] = 'sess';
879 $this->filter[] = 'webr';
880 $this->filter[] = 'crs';
881 $this->filter[] = 'mep';
882 $this->filter[] = 'tst';
883 $this->filter[] = 'svy';
884 $this->filter[] = 'qpl';
885 $this->filter[] = 'spl';
886 $this->filter[] = 'glo';
887 $this->filter[] = 'lm';
888 $this->filter[] = 'dbk';
889 $this->filter[] = 'pg';
890 $this->filter[] = 'st';
891 $this->filter[] = 'sahs';
892 $this->filter[] = 'htlm';
893 $this->filter[] = 'file';
894 $this->filter[] = 'mob';
895 $this->filter[] = 'mpg';
896 }
897 return true;
898 }
static _getActivatedObjTypes()
get activated obj types
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
static http()
Fetches the global http state from ILIAS.
$query

References $query, ilAdvancedMDRecord\_getActivatedObjTypes(), ILIAS\UI\examples\Symbol\Glyph\Filter\filter(), ilSession\get(), getQueryFromPost(), ILIAS\FileDelivery\http(), and ilSession\set().

Referenced by __construct().

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

◆ __storeEntries()

ilAdvancedSearchGUI::__storeEntries ( ilSearchResult  $res,
ilSearchResult  $new_res 
)

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

918 : bool
919 {
920 if (!$this->stored) {
921 $res->mergeEntries($new_res);
922 $this->stored = true;
923 return true;
924 } else {
925 $res->intersectEntries($new_res);
926 return true;
927 }
928 }

References $res.

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

+ Here is the caller graph for this function:

◆ executeCommand()

ilAdvancedSearchGUI::executeCommand ( )

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

77 : bool
78 {
79 $next_class = $this->ctrl->getNextClass($this);
80 $cmd = $this->ctrl->getCmd();
81
82 switch ($next_class) {
83 case "ilpropertyformgui":
84
85
86 case 'ilobjectcopygui':
87 $this->prepareOutput();
88 $this->ctrl->setReturn($this, '');
89
90 $cp = new ilObjectCopyGUI($this);
91 $this->ctrl->forwardCommand($cp);
92 break;
93
94 default:
95 $this->initUserSearchCache();
96 if (!$cmd) {
97 $last_sub_section = (int) ilSession::get('search_last_sub_section');
98 switch ($last_sub_section) {
100 $cmd = "showSavedAdvMDResults";
101 break;
102
103 default:
104 $cmd = "showSavedResults";
105 break;
106 }
107 }
108 $this->prepareOutput();
109 $this->handleCommand($cmd);
110 break;
111 }
112 return true;
113 }
GUI class for the workflow of copying objects.
handleCommand(string $a_cmd)

References ILIAS\Repository\ctrl(), ilSession\get(), ilSearchBaseGUI\handleCommand(), initUserSearchCache(), ILIAS\Repository\int(), prepareOutput(), and TYPE_ADV_MD.

+ Here is the call graph for this function:

◆ getQueryFromPost()

ilAdvancedSearchGUI::getQueryFromPost ( )
private

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

973 : array
974 {
975 $query = [];
976 if ($this->http->wrapper()->post()->has('query')) {
977 $query = $this->http->wrapper()->post()->retrieve(
978 'query',
979 $this->refinery->kindlyTo()->dictOf(
980 $this->refinery->byTrying([
981 $this->refinery->kindlyTo()->string(),
982 $this->refinery->kindlyTo()->dictOf(
983 $this->refinery->kindlyTo()->string()
984 )
985 ])
986 )
987 );
988 }
989 return $query;
990 }

References $query, ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by __setSearchOptions(), and performSearch().

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

◆ getRootNode()

ilAdvancedSearchGUI::getRootNode ( )

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

71 : int
72 {
73 return ROOT_FOLDER_ID;
74 }
const ROOT_FOLDER_ID
Definition: constants.php:32

References ROOT_FOLDER_ID.

Referenced by performAdvMDSearch(), and performSearch().

+ Here is the caller graph for this function:

◆ initAdvancedMetaDataForm()

ilAdvancedSearchGUI::initAdvancedMetaDataForm ( )
protected

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

258 {
259 if (is_object($this->form)) {
260 return $this->form;
261 }
262 $this->form = new ilPropertyFormGUI();
263 $this->form->setFormAction($this->ctrl->getFormAction($this, 'performAdvMDSearch'));
264 $this->form->setTitle($this->lng->txt('adv_md_search_title'));
265 $this->form->addCommandButton('performAdvMDSearch', $this->lng->txt('search'));
266 #$this->form->setSubformMode('right');
267
268 $content = new ilTextInputGUI($this->lng->txt('meta_title') . '/' .
269 $this->lng->txt('meta_keyword') . '/' .
270 $this->lng->txt('meta_description'), 'title');
271 $content->setValue($this->options['title']);
272 $content->setSize(30);
273 $content->setMaxLength(255);
274 // $content->setSubformMode('right');
275 $group = new ilRadioGroupInputGUI('', 'title_ao');
276 $group->setValue($this->options['title_ao']);
277 $radio_option = new ilRadioOption($this->lng->txt("search_any_word"), '0');
278 $group->addOption($radio_option);
279 $radio_option = new ilRadioOption($this->lng->txt("search_all_words"), '1');
280 $group->addOption($radio_option);
281 $content->addSubItem($group);
282 $this->form->addItem($content);
283
284 $type = new ilSelectInputGUI($this->lng->txt('type'), 'type');
285 $options['adv_all'] = $this->lng->txt('search_any');
286 foreach (ilAdvancedMDRecord::_getActivatedObjTypes() as $obj_type) {
287 $options[$obj_type] = $this->lng->txt('objs_' . $obj_type);
288 }
289 $type->setOptions($options);
290 $type->setValue($this->options['type']);
291 $this->form->addItem($type);
292
294 $record_gui->setPropertyForm($this->form);
295 $record_gui->setSearchValues($this->options);
296 $record_gui->parse();
297 return null;
298 }
This class represents a property form user interface.
This class represents a property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilPropertyFormGUI $form
This class represents a selection list property in a property form.
This class represents a text property in a property form.
form( $class_path, string $cmd)
$type

References ilSearchBaseGUI\$form, $options, $type, ilAdvancedMDRecord\_getActivatedObjTypes(), ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ILIAS\Repository\lng(), 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

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

363 : bool
364 {
365 $this->form = new ilPropertyFormGUI();
366 $this->form->setFormAction($this->ctrl->getFormAction($this, 'performSearch'));
367 $this->form->setTitle($this->lng->txt('search_advanced'));
368 $this->form->addCommandButton('performSearch', $this->lng->txt('search'));
369 $this->form->addCommandButton('reset', $this->lng->txt('reset'));
370 foreach ($this->fields->getActiveSections() as $definition) {
371 if ($definition['name'] != 'default') {
372 $section = new ilFormSectionHeaderGUI();
373 $section->setTitle($definition['name']);
374 $this->form->addItem($section);
375 }
376
377 foreach ($definition['fields'] as $field_name) {
378 if (is_object($element = $this->fields->getFormElement($this->search_cache->getQuery(), $field_name, $this->form))) {
379 $this->form->addItem($element);
380 }
381 }
382 }
383 return true;
384 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Repository\ctrl(), fields, ILIAS\Repository\form(), and ILIAS\Repository\lng().

Referenced by searchAdvancedMD(), and showSearch().

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

◆ initSearchType()

ilAdvancedSearchGUI::initSearchType ( int  $type)
private

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

962 : void
963 {
964 if ($type == self::TYPE_LOM) {
965 ilSession::set('search_last_sub_section', self::TYPE_LOM);
966 $this->search_cache->switchSearchType(ilUserSearchCache::ADVANCED_SEARCH);
967 } else {
968 ilSession::set('search_last_sub_section', self::TYPE_ADV_MD);
969 $this->search_cache->switchSearchType(ilUserSearchCache::ADVANCED_MD_SEARCH);
970 }
971 }

References $type, ilUserSearchCache\ADVANCED_MD_SEARCH, ilUserSearchCache\ADVANCED_SEARCH, and ilSession\set().

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

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

◆ initUserSearchCache()

ilAdvancedSearchGUI::initUserSearchCache ( )
private

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

930 : void
931 {
932 $this->search_cache = ilUserSearchCache::_getInstance($this->user->getId());
933 $this->search_cache->switchSearchType(ilUserSearchCache::ADVANCED_SEARCH);
934 $page_number = $this->initPageNumberFromQuery();
935 if ($page_number) {
936 $this->search_cache->setResultPageNumber($page_number);
937 }
938 $post_cmd = (array) ($this->http->request()->getParsedBody()['cmd'] ?? []);
939 $post_query = (array) ($this->http->request()->getParsedBody()['query'] ?? []);
940 if ($post_cmd['performSearch'] ?? null) {
941 $this->search_cache->setQuery($post_query['lomContent'] ?? '');
942 $this->search_cache->save();
943 }
944 }
static _getInstance(int $a_usr_id)

References ilUserSearchCache\_getInstance(), ilUserSearchCache\ADVANCED_SEARCH, ILIAS\FileDelivery\http(), ilSearchBaseGUI\initPageNumberFromQuery(), and ILIAS\Repository\user().

Referenced by executeCommand().

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

◆ performAdvMDSearch()

ilAdvancedSearchGUI::performAdvMDSearch ( )
protected

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

301 : bool
302 {
303 $this->initSearchType(self::TYPE_ADV_MD);
304 $page_number = $this->initPageNumberFromQuery();
305 if (!$page_number and $this->search_mode != 'in_results') {
306 ilSession::clear('adv_max_page');
307 $this->search_cache->delete();
308 }
309 $res = new ilSearchResult();
310 if ($res_tit = $this->__performTitleSearch()) {
311 $this->__storeEntries($res, $res_tit);
312 }
313 $this->searchAdvancedMD($res);
314 if ($this->search_mode == 'in_results') {
315 $old_result_obj = new ilSearchResult($this->user->getId());
316 $old_result_obj->read(ilUserSearchCache::ADVANCED_MD_SEARCH);
317
318 $res->diffEntriesFromResult();
319 }
320 $res->filter($this->getRootNode(), true);
321 $res->save();
322 $this->showAdvMDSearch();
323
324 if (!count($res->getResults())) {
325 $this->tpl->setOnScreenMessage('info', $this->lng->txt('search_no_match'));
326 }
327
328 if ($res->isLimitReached()) {
329 #$message = sprintf($this->lng->txt('search_limit_reached'),$this->settings->getMaxHits());
330 #ilUtil::sendInfo($message);
331 }
332
333 $this->addPager($res, 'adv_max_page');
334
336 $presentation->setResults($res->getResultsForPresentation());
337 $presentation->setPreviousNext($this->prev_link, $this->next_link);
338
339 if ($presentation->render()) {
340 $this->tpl->setVariable('RESULTS', $presentation->getHTML());
341 }
342 return true;
343 }
searchAdvancedMD(ilSearchResult $res)
__storeEntries(ilSearchResult $res, ilSearchResult $new_res)
addPager($result, string $a_session_key)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static clear(string $a_var)

References $res, __performTitleSearch(), __storeEntries(), ilSearchBaseGUI\addPager(), ilUserSearchCache\ADVANCED_MD_SEARCH, ilSession\clear(), getRootNode(), ilSearchBaseGUI\initPageNumberFromQuery(), initSearchType(), ILIAS\Repository\lng(), ilSearchResultPresentation\MODE_STANDARD, searchAdvancedMD(), showAdvMDSearch(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ performSearch()

ilAdvancedSearchGUI::performSearch ( )

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

163 : bool
164 {
165 global $DIC;
166 $this->initSearchType(self::TYPE_LOM);
167 $page_number = $this->initPageNumberFromQuery();
168 if (!$page_number and $this->search_mode != 'in_results') {
169 ilSession::clear('adv_max_page');
170 $this->search_cache->deleteCachedEntries();
171 }
172
173 if ($this->http->wrapper()->post()->has('query')) {
174 $this->search_cache->setQuery(
175 $this->getQueryFromPost()
176 );
177 }
178 $res = new ilSearchResult();
179 if ($res_con = $this->__performContentSearch()) {
180 $this->__storeEntries($res, $res_con);
181 }
182 if ($res_lan = $this->__performLanguageSearch()) {
183 $this->__storeEntries($res, $res_lan);
184 }
185 if ($res_gen = $this->__performGeneralSearch()) {
186 $this->__storeEntries($res, $res_gen);
187 }
188 if ($res_lif = $this->__performLifecycleSearch()) {
189 $this->__storeEntries($res, $res_lif);
190 }
191 if ($res_con = $this->__performContributeSearch()) {
192 $this->__storeEntries($res, $res_con);
193 }
194 if ($res_ent = $this->__performEntitySearch()) {
195 $this->__storeEntries($res, $res_ent);
196 }
197 if ($res_req = $this->__performRequirementSearch()) {
198 $this->__storeEntries($res, $res_req);
199 }
200 if ($res_for = $this->__performFormatSearch()) {
201 $this->__storeEntries($res, $res_for);
202 }
203 if ($res_edu = $this->__performEducationalSearch()) {
204 $this->__storeEntries($res, $res_edu);
205 }
206 if ($res_typ = $this->__performTypicalAgeRangeSearch()) {
207 $this->__storeEntries($res, $res_typ);
208 }
209 if ($res_rig = $this->__performRightsSearch()) {
210 $this->__storeEntries($res, $res_rig);
211 }
212 if ($res_cla = $this->__performClassificationSearch()) {
213 $this->__storeEntries($res, $res_cla);
214 }
215 if ($res_tax = $this->__performTaxonSearch()) {
216 $this->__storeEntries($res, $res_tax);
217 }
218 if ($res_key = $this->__performKeywordSearch()) {
219 $this->__storeEntries($res, $res_key);
220 }
221
222 $this->searchAdvancedMD($res);
223
224 if ($this->search_mode == 'in_results') {
225 $old_result_obj = new ilSearchResult($this->user->getId());
226 $old_result_obj->read(ilUserSearchCache::ADVANCED_MD_SEARCH);
227
228 $res->diffEntriesFromResult();
229 }
230
231 $res->filter($this->getRootNode(), (ilSearchSettings::getInstance()->getDefaultOperator() == ilSearchSettings::OPERATOR_AND));
232 $res->save();
233 $this->showSearch();
234
235 if (!count($res->getResults())) {
236 $this->tpl->setOnScreenMessage('info', $this->lng->txt('search_no_match'));
237 }
238
239 if ($res->isLimitReached()) {
240 #$message = sprintf($this->lng->txt('search_limit_reached'),$this->settings->getMaxHits());
241 #ilUtil::sendInfo($message);
242 }
243
244 $this->addPager($res, 'adv_max_page');
245
247 $presentation->setResults($res->getResultsForPresentation());
248 $presentation->setPreviousNext($this->prev_link, $this->next_link);
249
250 if ($presentation->render()) {
251 $this->tpl->setVariable('RESULTS', $presentation->getHTML());
252 }
253 return true;
254 }

References $DIC, $res, __performClassificationSearch(), __performContentSearch(), __performContributeSearch(), __performEducationalSearch(), __performEntitySearch(), __performFormatSearch(), __performGeneralSearch(), __performKeywordSearch(), __performLanguageSearch(), __performLifecycleSearch(), __performRequirementSearch(), __performRightsSearch(), __performTaxonSearch(), __performTypicalAgeRangeSearch(), __storeEntries(), ilSearchBaseGUI\addPager(), ilUserSearchCache\ADVANCED_MD_SEARCH, ilSession\clear(), ilSearchSettings\getInstance(), getQueryFromPost(), getRootNode(), ILIAS\FileDelivery\http(), ilSearchBaseGUI\initPageNumberFromQuery(), initSearchType(), ILIAS\Repository\lng(), ilSearchResultPresentation\MODE_STANDARD, ilSearchSettings\OPERATOR_AND, searchAdvancedMD(), showSearch(), and ILIAS\Repository\user().

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

400 : void
401 {
402 parent::prepareOutput();
403
404 $this->help_gui->setScreenIdComponent("src");
405
406 $this->tabs_gui->addTab(
407 "search",
408 $this->lng->txt("search"),
409 $this->ctrl->getLinkTargetByClass('ilsearchgui')
410 );
411 $this->tabs_gui->addTab(
412 "adv_search",
413 $this->lng->txt("search_advanced"),
414 $this->ctrl->getLinkTarget($this)
415 );
416 $this->tabs_gui->activateTab("adv_search");
417 }

References ILIAS\Repository\lng().

Referenced by executeCommand().

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

◆ remoteSearch()

ilAdvancedSearchGUI::remoteSearch ( )
protected

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

134 : void
135 {
136 $root_id = 0;
137 if ($this->http->wrapper()->post()->has('root_id')) {
138 $root_id = $this->http->wrapper()->post()->retrieve(
139 'root_id',
140 $this->refinery->kindlyTo()->int()
141 );
142 }
143 $queryString = '';
144 if ($this->http->wrapper()->post()->has('queryString')) {
145 $queryString = $this->http->wrapper()->post()->retrieve(
146 'queryString',
147 $this->refinery->kindlyTo()->string()
148 );
149 }
150 $this->search_cache->setRoot($root_id);
151 $this->search_cache->setResultPageNumber(1);
152 $this->search_cache->setQuery(array('lom_content' => $queryString));
153 $this->search_cache->save();
154
155 $this->options = $this->search_cache->getQuery();
156 $this->options['type'] = 'all';
157
158 $this->performSearch();
159 }

References ILIAS\FileDelivery\http(), performSearch(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ reset()

ilAdvancedSearchGUI::reset ( )

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

114 : void
115 {
116 $this->initSearchType(self::TYPE_LOM);
117 $this->options = array();
118 $this->search_cache->setQuery(array());
119 $this->search_cache->save();
120 $this->showSearch();
121 }

References initSearchType(), and showSearch().

+ Here is the call graph for this function:

◆ searchAdvancedMD()

ilAdvancedSearchGUI::searchAdvancedMD ( ilSearchResult  $res)
private

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

753 : void
754 {
755 $this->initFormSearch();
756
757 foreach (array_keys($this->options) as $key) {
758 if (substr((string) $key, 0, 3) != 'adv') {
759 continue;
760 }
761
762 // :TODO: ?
763 if (!$key) {
764 continue;
765 }
766
767 $field_id = substr($key, 4);
768 $field = ilAdvancedMDFieldDefinition::getInstance((int) $field_id);
769
770 $field_form = ilADTFactory::getInstance()->getSearchBridgeForDefinitionInstance($field->getADTDefinition(), true, false);
771 $field_form->setElementId("query[" . $key . "]");
772 $field_form->setForm($this->form);
773
774 // reload search values
775 $field_form->importFromPost($this->options);
776 $field_form->validate();
777
778 $parser_value = $field->getSearchQueryParserValue($field_form);
779 if (!strlen($parser_value)) {
780 continue;
781 }
782 $adv_md_search = ilObjectSearchFactory::_getAdvancedMDSearchInstance(new ilQueryParser($parser_value));
783 $adv_md_search->setFilter($this->filter);
784 $adv_md_search->setDefinition($field);
785 $adv_md_search->setSearchElement($field_form);
786 $res_field = $adv_md_search->performSearch();
787 $this->__storeEntries($res, $res_field);
788 }
789 }
static getInstance(?int $a_field_id, ?int $a_type=null, string $language='')
static _getAdvancedMDSearchInstance(ilQueryParser $query_parser)
string $key
Consumer key/client ID value.
Definition: System.php:193

References ILIAS\LTI\ToolProvider\$key, __storeEntries(), ilObjectSearchFactory\_getAdvancedMDSearchInstance(), ILIAS\UI\examples\Symbol\Glyph\Filter\filter(), ILIAS\Repository\form(), ilADTFactory\getInstance(), ilAdvancedMDFieldDefinition\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 123 of file class.ilAdvancedSearchGUI.php.

123 : bool
124 {
125 $this->initSearchType(self::TYPE_LOM);
126 $this->search_mode = 'in_results';
127 $this->search_cache->setResultPageNumber(1);
128 ilSession::clear('adv_max_page');
129 $this->performSearch();
130
131 return true;
132 }

References ilSession\clear(), initSearchType(), and performSearch().

+ Here is the call graph for this function:

◆ setSubTabs()

ilAdvancedSearchGUI::setSubTabs ( )

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

946 : bool
947 {
949 return true;
950 }
951 $this->tabs_gui->addSubTabTarget('search_lom', $this->ctrl->getLinkTarget($this, 'showSavedResults'));
952 return true;
953 }
static getSearchableDefinitionIds()
Get searchable definition ids (performance is key)

References ILIAS\Repository\ctrl(), and 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 ( )

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

346 : bool
347 {
348 $session_options = ilSession::get('search_adv_md');
349 if ($session_options !== null) {
350 $this->options = $session_options;
351 }
352 $this->setSubTabs();
353 $this->tabs_gui->setSubTabActive('search_adv_md');
354
355 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.advanced_adv_search.html', 'Services/Search');
356
358 $this->tpl->setVariable('SEARCH_FORM', $this->form->getHTML());
359 return true;
360 }

References ILIAS\Repository\form(), ilSession\get(), 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

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

420 : bool
421 {
422 $this->initSearchType(self::TYPE_ADV_MD);
423 $result_obj = new ilSearchResult($this->user->getId());
424 $result_obj->read(ilUserSearchCache::ADVANCED_MD_SEARCH);
425
426 $this->showAdvMDSearch();
427
428 // Show them
429 if (count($result_obj->getResults())) {
430 $this->addPager($result_obj, 'adv_max_page');
431
433 $presentation->setResults($result_obj->getResultsForPresentation());
434 $presentation->setPreviousNext($this->prev_link, $this->next_link);
435
436 if ($presentation->render()) {
437 $this->tpl->setVariable('RESULTS', $presentation->getHTML());
438 }
439 }
440
441 return true;
442 }

References ilSearchBaseGUI\addPager(), ilUserSearchCache\ADVANCED_MD_SEARCH, initSearchType(), ilSearchResultPresentation\MODE_STANDARD, showAdvMDSearch(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ showSavedResults()

ilAdvancedSearchGUI::showSavedResults ( )

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

445 : bool
446 {
447 $this->initSearchType(self::TYPE_LOM);
448 $result_obj = new ilSearchResult($this->user->getId());
449 $result_obj->read(ilUserSearchCache::ADVANCED_SEARCH);
450
451 $this->showSearch();
452
453 // Show them
454 if (count($result_obj->getResults())) {
455 $this->addPager($result_obj, 'adv_max_page');
456
458 $presentation->setResults($result_obj->getResultsForPresentation());
459 $presentation->setPreviousNext($this->prev_link, $this->next_link);
460
461 if ($presentation->render()) {
462 $this->tpl->setVariable('RESULTS', $presentation->getHTML());
463 }
464 }
465
466 return true;
467 }

References ilSearchBaseGUI\addPager(), ilUserSearchCache\ADVANCED_SEARCH, initSearchType(), ilSearchResultPresentation\MODE_STANDARD, showSearch(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ showSearch()

ilAdvancedSearchGUI::showSearch ( )

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

388 : bool
389 {
390 $this->setSubTabs();
391 $this->tabs_gui->setSubTabActive('search_lom');
392
393 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.advanced_search.html', 'Services/Search');
394
395 $this->initFormSearch();
396 $this->tpl->setVariable('SEARCH_FORM', $this->form->getHTML());
397 return true;
398 }

References ILIAS\Repository\form(), 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 ( array  $date,
array  $time = array() 
)
private

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

956 : int
957 {
958 return mktime($time['h'], $time['m'], 0, $date['m'], $date['d'], $date['y']);
959 }

Field Documentation

◆ $fields

ilLuceneAdvancedSearchFields ilAdvancedSearchGUI::$fields
protected

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

◆ $filter

array ilAdvancedSearchGUI::$filter = array()
protected

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

◆ $help_gui

ilHelpGUI ilAdvancedSearchGUI::$help_gui
protected

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

◆ $last_section

string ilAdvancedSearchGUI::$last_section = 'adv_search'
protected

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

◆ $options

array ilAdvancedSearchGUI::$options = array()
private

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

Referenced by __getFilterSelect(), and initAdvancedMetaDataForm().

◆ $stored

bool ilAdvancedSearchGUI::$stored = false
private

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

◆ $tabs_gui

ilTabsGUI ilAdvancedSearchGUI::$tabs_gui
protected

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

◆ TYPE_ADV_MD

const ilAdvancedSearchGUI::TYPE_ADV_MD = 2

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

Referenced by executeCommand().

◆ TYPE_LOM

const ilAdvancedSearchGUI::TYPE_LOM = 1

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


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