Display the search engine specific configuration, and the search page specific analytics and suggestions.
334056
public function getCMSFields() {

		$fields = parent::getCMSFields();
		Requirements::css('nglasl/silverstripe-extensible-search: client/css/extensible-search.css');

		// Determine the search engines that are available.

		$engines = array();
		foreach(self::config()->custom_search_engines as $engine => $display) {

			// The search engines may define an optional display title.

			if(is_numeric($engine)) {
				$engine = $display;
			}

			// Determine whether the search engines exist.

			if(ClassInfo::exists($engine)) {
				$engines[$engine] = $display;
			}
		}

		// Determine whether the full-text search engine is available.

		$configuration = Config::inst();
		$classes = $configuration->get(FulltextSearchable::class, 'searchable_classes');
		if(is_array($classes) && (count($classes) > 0)) {
			$engines['Full-Text'] = 'Full-Text';
		}

		// Display the search engine selection.

		$fields->addFieldToTab('Root.Main', DropdownField::create(
			'SearchEngine',
			_t('EXTENSIBLE_SEARCH.SEARCH_ENGINE', 'Search Engine'),
			$engines
		)->setHasEmptyDefault(true)->setDescription('This needs to be saved before further customisation is available'), 'Title');

		// Determine whether a search engine has been selected.

		if($this->SearchEngine && isset($engines[$this->SearchEngine])) {

			// Display a search engine specific notice.

			$fields->addFieldToTab('Root.Main', LiteralField::create(
				'SearchEngineNotice',
				"<p class='extensible-search notice'><strong>{$engines[$this->SearchEngine]} Search Page</strong></p>"
			), 'Title');

			// Determine whether the search engine supports hierarchy filtering.

			$hierarchy = $this->supports_hierarchy;
			if($this->SearchEngine !== 'Full-Text') {
				$hierarchy = singleton($this->SearchEngine)->supports_hierarchy;
			}

			// The search engine may only support limited hierarchy filtering for multiple sites.

			if($hierarchy || ClassInfo::exists(Multisites::class)) {

				// Display the search trees selection.

				$fields->addFieldToTab('Root.Main', $tree = TreeMultiselectField::create(
					'SearchTrees',
					_t('EXTENSIBLE_SEARCH.SEARCH_TREES', 'Search Trees'),
					SiteTree::class
				), 'Content');

				// Determine whether the search engine only supports limited hierarchy filtering.

				if(!$hierarchy) {

					// Update the search trees to reflect this.

					$tree->setDisableFunction(function($page) {

						return ($page->ParentID != 0);
					});
					$tree->setDescription('This <strong>search engine</strong> only supports limited hierarchy');
				}
			}

			// Display the sorting selection.

			$fields->addFieldToTab('Root.Main', DropdownField::create(
				'SortBy',
				_t('EXTENSIBLE_SEARCH.SORT_BY', 'Sort By'),
				$this->getSelectableFields()
			), 'Content');
			$fields->addFieldToTab('Root.Main', DropdownField::create(
				'SortDirection',
				_t('EXTENSIBLE_SEARCH.SORT_DIRECTION', 'Sort Direction'),
				array(
					'DESC' => _t('EXTENSIBLE_SEARCH.DESCENDING', 'Descending'),
					'ASC' => _t('EXTENSIBLE_SEARCH.ASCENDING', 'Ascending')
				)
			), 'Content');

			// Display the start with listing selection.

			$fields->addFieldToTab('Root.Main', CheckboxField::create(
				'StartWithListing',
				_t('EXTENSIBLE_SEARCH.START_WITH_LISTING?', 'Start With Listing?')
			)->addExtraClass('start-with-listing'), 'Content');

			// Display the results per page selection.

			$fields->addFieldToTab('Root.Main', NumericField::create(
				'ResultsPerPage',
				_t('EXTENSIBLE_SEARCH.RESULTS_PER_PAGE', 'Results Per Page')
			), 'Content');
		}
		else {

			// The search engine has not been selected.

			$fields->addFieldToTab('Root.Main', LiteralField::create(
				'SearchEngineNotification',
				"<p class='extensible-search notification'><strong>Select a Search Engine</strong></p>"
			), 'Title');
		}

		// The history view shouldn't show the following, as they're not versioned.

		$pageHistory = Controller::has_curr() && (Controller::curr() instanceof CMSPageHistoryController);

		// Determine whether analytics have been enabled.

		if($configuration->get(ExtensibleSearch::class, 'enable_analytics') && !$pageHistory) {

			// Instantiate the analytic summary.

			$fields->findOrMakeTab('Root.SearchAnalytics.Current', _t('EXTENSIBLE_SEARCH.CURRENT', 'Current'));
			$fields->findOrMakeTab('Root.SearchAnalytics')->setTitle(_t('EXTENSIBLE_SEARCH.SEARCH_ANALYTICS', 'Search Analytics'));
			$fields->addFieldToTab('Root.SearchAnalytics.Current', $summary = GridField::create(
				'HistorySummary',
				_t('EXTENSIBLE_SEARCH.SUMMARY', 'Summary'),
				$this->getHistorySummary()
			)->setModelClass(ExtensibleSearch::class));
			$summaryConfiguration = $summary->getConfig();

			// Update the display columns.

			$summaryDisplay = singleton(ExtensibleSearchArchived::class)->fieldLabels();
			$summaryConfiguration->getComponentByType(GridFieldDataColumns::class)->setDisplayFields($summaryDisplay);

			// Instantiate an export button.

			if($this->getHistorySummary()->exists()) {
				$summaryConfiguration->addComponent($summaryExport = new GridFieldExportButton());
				$summaryExport->setExportColumns($summaryDisplay);
			}

			// Update the custom summary fields to be sortable.

			$summaryConfiguration->getComponentByType(GridFieldSortableHeader::class)->setFieldSorting(array(
				'FrequencyPercentage' => 'Frequency'
			));
			$summaryConfiguration->removeComponentsByType(GridFieldFilterHeader::class);

			// Instantiate the analytic history.

			$fields->addFieldToTab('Root.SearchAnalytics.Current', $history = GridField::create(
				'History',
				_t('EXTENSIBLE_SEARCH.HISTORY', 'History'),
				$this->History()
			)->setModelClass(ExtensibleSearch::class));
			$historyConfiguration = $history->getConfig();

			// Update the custom summary fields to be sortable.

			$historyConfiguration->getComponentByType(GridFieldSortableHeader::class)->setFieldSorting(array(
				'Created.Nice' => 'Created',
				'TimeTakenSummary' => 'Time',
				'SearchEngineSummary' => 'SearchEngine'
			));
			$historyConfiguration->removeComponentsByType(GridFieldFilterHeader::class);

			// Instantiate the archived collection of search analytics.

			$archives = $this->Archives();
			if($archives->exists() && $archives->first()->canView()) {
				$fields->findOrMakeTab('Root.SearchAnalytics.Archives', _t('EXTENSIBLE_SEARCH.ARCHIVES', 'Archives'));
				$fields->addFieldToTab('Root.SearchAnalytics.Archives', GridField::create(
					'Archives',
					_t('EXTENSIBLE_SEARCH.ARCHIVES', 'Archives'),
					$archives,
					$archivesConfiguration = GridFieldConfig_RecordEditor::create()
				)->setModelClass(ExtensibleSearchArchive::class));

				// Update the custom summary fields to be sortable.

				$archivesConfiguration->getComponentByType(GridFieldSortableHeader::class)->setFieldSorting(array(
					'TitleSummary' => 'StartingDate'
				));
				$archivesConfiguration->removeComponentsByType(GridFieldFilterHeader::class);
			}
		}

		// Determine whether suggestions have been enabled.

		if($configuration->get(ExtensibleSearchSuggestion::class, 'enable_suggestions') && !$pageHistory) {

			// Appropriately restrict the approval functionality.

			$user = Member::currentUserID();
			if(Permission::checkMember($user, 'EXTENSIBLE_SEARCH_SUGGESTIONS')) {
				Requirements::javascript('nglasl/silverstripe-extensible-search: client/javascript/extensible-search-approval.js');
			}

			// Determine the search page specific suggestions.

			$fields->findOrMakeTab('Root.SearchSuggestions', _t('EXTENSIBLE_SEARCH.SEARCH_SUGGESTIONS', 'Search Suggestions'));
			$fields->addFieldToTab('Root.SearchSuggestions', GridField::create(
				'Suggestions',
				_t('EXTENSIBLE_SEARCH.SUGGESTIONS', 'Suggestions'),
				$this->Suggestions(),
				$suggestionsConfiguration =
					singleton(ExtensibleSearchSuggestion::class)->canEdit() ? GridFieldConfig_RecordEditor::create() : GridFieldConfig_Base::create()
			)->setModelClass(ExtensibleSearchSuggestion::class));

			// Update the custom summary fields to be sortable.

			$suggestionsConfiguration->getComponentByType(GridFieldSortableHeader::class)->setFieldSorting(array(
				'FrequencySummary' => 'Frequency',
				'FrequencyPercentage' => 'Frequency',
				'ApprovedField' => 'Approved'
			));
			$suggestionsConfiguration->removeComponentsByType(GridFieldFilterHeader::class);
		}

		// Allow extension customisation.

		$this->extend('updateExtensibleSearchPageCMSFields', $fields);
		return $fields;
	}
1330259
def show():
    
    if not is_configured():
        raise JutException('No configurations available, please run: `jut config add`')

    info('Available jut configurations:')
    index = 0
    for configuration in _CONFIG.sections():
        username = _CONFIG.get(configuration, 'username')
        app_url = _CONFIG.get(configuration, 'app_url')

        if app_url != defaults.APP_URL:
            if _CONFIG.has_option(configuration, 'default'):
                info(' %d: %s@%s (default)', index + 1, username, app_url)
            else:
                info(' %d: %s@%s', index + 1, username, app_url)

        else:
            if _CONFIG.has_option(configuration, 'default'):
                info(' %d: %s (default)' % (index + 1, username))
            else:
                info(' %d: %s' % (index + 1, username))

        index += 1
1286365
public function frequentlySearchedAction()
    {
        /** @var  $searchResultSet SearchResultSet */
        $searchResultSet = GeneralUtility::makeInstance(SearchResultSet::class);

        $pageId = $this->typoScriptFrontendController->getRequestedId();
        $languageId = $this->typoScriptFrontendController->sys_language_uid;
        $searchRequest = $this->getSearchRequestBuilder()->buildForFrequentSearches($pageId, $languageId);
        $searchResultSet->setUsedSearchRequest($searchRequest);

        $this->controllerContext->setSearchResultSet($searchResultSet);

        $values = [
            'additionalFilters' => $this->getAdditionalFilters(),
            'resultSet' => $searchResultSet
        ];
        $values = $this->emitActionSignal(__CLASS__, __FUNCTION__, [$values]);

        $this->view->assignMultiple($values);
    }
762413
public function display() {
        if (count($this->capabilities) > self::NUM_CAPS_FOR_SEARCH) {
            global $PAGE;
            $jsmodule = array(
                'name' => 'rolescapfilter',
                'fullpath' => '/admin/roles/module.js',
                'strings' => array(
                    array('filter', 'moodle'),
                    array('clear', 'moodle'),                ),
                'requires' => array('node', 'cookie', 'escape')
            );
            $PAGE->requires->js_init_call('M.core_role.init_cap_table_filter', array($this->id, $this->context->id), false,
                $jsmodule);
        }
        echo '<table class="' . implode(' ', $this->classes) . '" id="' . $this->id . '">' . "\n<thead>\n";
        echo '<tr><th class="name" align="left" scope="col">' . get_string('capability', 'core_role') . '</th>';
        $this->add_header_cells();
        echo "</tr>\n</thead>\n<tbody>\n";

        // Loop over capabilities.
        $contextlevel = 0;
        $component = '';
        foreach ($this->capabilities as $capability) {
            if ($this->skip_row($capability)) {
                continue;
            }

            // Prints a breaker if component or name or context level has changed.
            if (component_level_changed($capability, $component, $contextlevel)) {
                $this->print_heading_row($capability);
            }
            $contextlevel = $capability->contextlevel;
            $component = $capability->component;

            // Start the row.
            $rowattributes = $this->get_row_attributes($capability);
            // Handle class attributes same as other.
            $rowclasses = array_unique(array_merge(array('rolecap'), $this->get_row_classes($capability)));
            if (array_key_exists('class', $rowattributes)) {
                $rowclasses = array_unique(array_merge($rowclasses, array($rowattributes['class'])));
            }
            $rowattributes['class']  = implode(' ', $rowclasses);

            // Table cell for the capability name.
            $contents = '<th scope="row" class="name"><span class="cap-desc">' . get_capability_docs_link($capability) .
                '<span class="cap-name">' . $capability->name . '</span></span></th>';

            // Add the cells specific to this table.
            $contents .= $this->add_row_cells($capability);

            echo html_writer::tag('tr', $contents, $rowattributes);
        }

        // End of the table.
        echo "</tbody>\n</table>\n";
    }
610068
private void doSearch()
    {
        setSearchPanelVisible(true);
        String selectedText = textComponent.getSelectedText();
        if (selectedText != null)
        {
            searchPanel.setQuery(selectedText);
        }
        searchPanel.requestFocusForTextField();
    }
1110166
def search_repository_configuration(url, page_size=10, page_index=0, sort=""):
    
    content = search_repository_configuration_raw(url, page_size, page_index, sort)
    if content:
        return utils.format_json_list(content)
936600
public function index()
    {
        if($this->presenter->page->file instanceof SplFileInfo) {
            $this->view->page(presenter()->page->file->getRealPath());
        }
    }
1104966
public function seo()
    {
        $keys = [
            'SEO__application-name',
            'SEO__google-site-verification',
            'SEO__meta-robots-index',
            'SEO__meta-robots-follow',
            'SEO__meta-robots-noodp',
            'SEO__display-search-box',
            'SEO__Social__facebook_url',
            'SEO__Social__facebook_page_id',
            'SEO__Social__twitter_username',
            'SEO__Social__instagram_url',
            'SEO__Social__linkedin_url',
            'SEO__Social__myspace_url',
            'SEO__Social__pinterest_url',
            'SEO__Social__youtube_url',
            'SEO__Social__googleplus_url'
        ];

        /** @var SeoSettingsTable $SeoSettings */
        $SeoSettings = $this->loadModel('Wasabi/Cms.SeoSettings');

        $settings = $SeoSettings->getKeyValues(new GeneralSetting(), $keys);

        if ($this->request->is('post') && !empty($this->request->data)) {
            $this->request->data['SEO__Social__twitter_username'] = ltrim(trim($this->request->data['SEO__Social__twitter_username']), '@');
            $settings = $SeoSettings->newEntity($this->request->data);
            if (!$settings->errors()) {
                if ($SeoSettings->saveKeyValues($settings, $keys)) {
                    $this->Flash->success(__d('wasabi_cms', 'The SEO settings have been updated.'));
                    $this->redirect(['action' => 'seo']);
                    return;
                } else {
                    $this->Flash->error($this->dbErrorMessage);
                }
            } else {
                $this->Flash->error($this->formErrorMessage);
            }
        }
        $this->set([
            'settings' => $settings
        ]);
    }
158562
public function index()
    {
        $this->request->allowMethod('get');

        $query = $this->SavedSearches->find('all')
            ->where(['name IS NOT' => null])
            ->where(['name !=' => ''])
            ->where($this->request->getQueryParams());

        $entities = $this->paginate($query);

        $this->set('success', true);
        $this->set('data', $entities);
        $this->set('_serialize', ['success', 'data']);
    }
562324
public function index()
    {
        //  Meta & Breadcrumbs
        $this->data['page']->title            = APP_NAME . ' Blog';
        $this->data['page']->seo->description = '';
        $this->data['page']->seo->keywords    = '';

        // --------------------------------------------------------------------------

        //  Handle pagination
        $page      = $this->uri->rsegment(3);
        $perPage  = appSetting('home_per_page', 'blog-' . $this->oBlog->id);
        $perPage  = $perPage ? $perPage : 10;

        $this->data['pagination']           = new stdClass();
        $this->data['pagination']->page     = $page;
        $this->data['pagination']->per_page = $perPage;

        // --------------------------------------------------------------------------

        //  Send any additional data
        $data                    = array();
        $data['include_body']    = !appSetting('use_excerpts', 'blog-' . $this->oBlog->id);
        $data['include_gallery'] = appSetting('home_show_gallery', 'blog-' . $this->oBlog->id);
        $data['sort']            = array('bp.published', 'desc');

        //  Only published items which are not schduled for the future
        $data['where']   = array();
        $data['where'][] = array('column' => 'blog_id',      'value' => $this->oBlog->id);
        $data['where'][] = array('column' => 'is_published', 'value' => true);
        $data['where'][] = array('column' => 'published <=', 'value' => 'NOW()', 'escape' => false);

        // --------------------------------------------------------------------------

        //  Load posts and count
        $this->data['posts'] = $this->blog_post_model->getAll($page, $perPage, $data);
        $this->data['pagination']->total = $this->blog_post_model->countAll($data);

        // --------------------------------------------------------------------------

        //  Widgets
        $this->fetchSidebarWidgets();

        // --------------------------------------------------------------------------

        $this->data['isIndex'] = true;

        // --------------------------------------------------------------------------

        //  Load views
        $oView = Factory::service('View');
        $oView->load('structure/header', $this->data);
        $this->loadView('browse', $this->data);
        $oView->load('structure/footer', $this->data);
    }
1150008
function defaultAnalytics() {
  if (window._gaq) {
    _gaq.push(["_trackPageview"]);
  }
  if (window.ga) {
    ga("send", "pageview", { page: location.pathname, title: document.title });
  }
}
176130
def index():
    """"""
    crawlers = []
    for crawler in manager:
        data = Event.get_counts(crawler)
        data['last_active'] = crawler.last_run
        data['total_ops'] = crawler.op_count
        data['running'] = crawler.is_running
        data['crawler'] = crawler
        crawlers.append(data)
    return render_template('index.html', crawlers=crawlers)
221091
public function index()
    {
        $diagnostics = $this->getDiagnosticDataTable()->getDiagnostics($this->getRequestOptions());

        $config = $this->loadConfig();
        $data = array(
            'title'  => __('Readiness diagnostics'),
            'set'    => json_encode($diagnostics),
            'config' => json_encode($config['diagnostic']),
        );

        $userLabel = SessionManager::getSession()->getUserLabel();

        $this->defaultData();

        if (!empty($config['diagnostic']['pageTitle'])) {
            $this->setData('title', $config['diagnostic']['pageTitle']);
        }

        $this->setData('cls', 'diagnostic-index');
        $this->setData('userLabel', $userLabel);
        $this->setData('data', $data);
        $this->setData('content-template', 'pages/index.tpl');
        $this->setView('layout.tpl');
    }
1177984
public function index() {
		$pageTitle = __d('cake_search_info', 'Search information');
		$breadCrumbs = $this->Search->getBreadcrumbInfo();
		$breadCrumbs[] = __d('cake_search_info', 'New search');
		$this->set(compact('pageTitle', 'breadCrumbs'));
		$this->set('search_urlActionSearch', null);
	}
949300
function () {
    addCacheItem(params.context.page);
    params.context.lunr = params.context.lunr || {};
    params.context.lunr.dataPath = params.context.lunr.dataPath || 'search_index.json';
  }
1284376
protected function addStandardAssignments()
    {
        $this->searchProvider->setConfigurationValue('extendedSearch', $this->searchProvider->isExtendedSearch());
        $this->searchProvider->setConfigurationValue(
            'uid',
            $this->configurationManager->getContentObject()->data['uid']
        );
        $this->searchProvider->setConfigurationValue('prefixID', 'tx_find_find');
        $this->searchProvider->setConfigurationValue('pageTitle', $GLOBALS['TSFE']->page['title']);
    }
352450
def show_settings(self):
        
        self.notes.config.put_values()
        self.overview.config.put_values()
        self.settings.config.put_values()
        self.spectrum.config.put_values()
        self.traces.config.put_values()
        self.video.config.put_values()

        self.settings.show()