当前位置: 首页>>代码示例>>PHP>>正文


PHP Tx_Solr_Util::getSolrConfigurationFromPageId方法代码示例

本文整理汇总了PHP中Tx_Solr_Util::getSolrConfigurationFromPageId方法的典型用法代码示例。如果您正苦于以下问题:PHP Tx_Solr_Util::getSolrConfigurationFromPageId方法的具体用法?PHP Tx_Solr_Util::getSolrConfigurationFromPageId怎么用?PHP Tx_Solr_Util::getSolrConfigurationFromPageId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tx_Solr_Util的用法示例。


在下文中一共展示了Tx_Solr_Util::getSolrConfigurationFromPageId方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 /**
  * Works through the indexing queue and indexes the queued items into Solr.
  *
  * @return	boolean	Returns TRUE on success, FALSE if no items were indexed or none were found.
  * @see	typo3/sysext/scheduler/tx_scheduler_Task#execute()
  */
 public function execute()
 {
     $executionSucceeded = FALSE;
     $this->configuration = Tx_Solr_Util::getSolrConfigurationFromPageId($this->site->getRootPageId());
     $this->indexItems();
     $this->cleanIndex();
     $executionSucceeded = TRUE;
     return $executionSucceeded;
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:15,代码来源:IndexQueueWorkerTask.php

示例2: setLogging

 /**
  * Enables logging dependent on the configuration of the item's site
  *
  * @param	Tx_Solr_IndexQueue_Item	$item An item being indexed
  * @return	void
  */
 protected function setLogging(Tx_Solr_IndexQueue_Item $item)
 {
     // reset
     $this->loggingEnabled = FALSE;
     $solrConfiguration = Tx_Solr_Util::getSolrConfigurationFromPageId($item->getRootPageUid());
     if (!empty($solrConfiguration['logging.']['indexing']) || !empty($solrConfiguration['logging.']['indexing.']['queue']) || !empty($solrConfiguration['logging.']['indexing.']['queue.'][$item->getIndexingConfigurationName()])) {
         $this->loggingEnabled = TRUE;
     }
 }
开发者ID:punktDe,项目名称:solr,代码行数:15,代码来源:Indexer.php

示例3: getIndexQueueConfigurationTableMap

 /**
  * Builds a map of indexing configuration names to tables to to index.
  *
  * @return array Indexing configuration to database table map
  */
 protected function getIndexQueueConfigurationTableMap()
 {
     $indexingTableMap = array();
     $solrConfiguration = \Tx_Solr_Util::getSolrConfigurationFromPageId($this->site->getRootPageId());
     foreach ($solrConfiguration['index.']['queue.'] as $name => $configuration) {
         if (is_array($configuration)) {
             $name = substr($name, 0, -1);
             if ($solrConfiguration['index.']['queue.'][$name]) {
                 $table = $name;
                 if ($solrConfiguration['index.']['queue.'][$name . '.']['table']) {
                     $table = $solrConfiguration['index.']['queue.'][$name . '.']['table'];
                 }
                 $indexingTableMap[$name] = $table;
             }
         }
     }
     return $indexingTableMap;
 }
开发者ID:romaincanon,项目名称:ext-solr,代码行数:23,代码来源:IndexingConfigurationSelectorField.php

示例4: getIndexingConfigurationsByItem

 /**
  * Gets the indexing configurations to use for an item.
  * Multiple configurations for a certain item type (table) might be available.
  *
  * @param string $itemType The item's type, usually a table name.
  * @param string $itemUid The item's uid, usually an integer uid, could be a
  *      different value for non-database-record types.
  * @param integer $rootPageId The configuration's page tree's root page id.
  *      Optional, not needed for all types.
  * @return array<string> The indexing configurations names to use when indexing
  */
 protected function getIndexingConfigurationsByItem($itemType, $itemUid, $rootPageId = NULL)
 {
     $possibleIndexingConfigurationNames = array();
     if (!is_null($rootPageId)) {
         // get configuration for the root's branch
         $solrConfiguration = Tx_Solr_Util::getSolrConfigurationFromPageId($rootPageId);
         // which configurations are there?
         $indexingConfigurations = $this->getTableIndexingConfigurations($solrConfiguration);
         foreach ($indexingConfigurations as $indexingConfigurationName) {
             if ($indexingConfigurationName == $itemType || !empty($solrConfiguration['index.']['queue.'][$indexingConfigurationName . '.']['table']) && $solrConfiguration['index.']['queue.'][$indexingConfigurationName . '.']['table'] == $itemType) {
                 $possibleIndexingConfigurationNames[] = $indexingConfigurationName;
             }
         }
     }
     return $possibleIndexingConfigurationNames;
 }
开发者ID:sfsmfc,项目名称:solr,代码行数:27,代码来源:Queue.php

示例5: getSolrConfiguration

 /**
  * Gets the site's Solr TypoScript configuration (plugin.tx_solr.*)
  *
  * @return array The Solr TypoScript configuration
  */
 public function getSolrConfiguration()
 {
     return Tx_Solr_Util::getSolrConfigurationFromPageId($this->rootPage['uid']);
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:9,代码来源:Site.php

示例6: getMonitoredTables

 /**
  * Gets an array of tables configured for indexing by the Index Queue. The
  * record monitor must watch these tables for manipulation.
  *
  * @param	integer	The page id for which we need to retrieve the configuration for
  * @return	array	Array of table names to be watched by the record monitor.
  */
 protected function getMonitoredTables($pageId)
 {
     $monitoredTables = array();
     // FIXME!! $pageId might be outside of a site root and thus might not know about solr configuration
     // -> leads to record not being queued for reindexing
     $solrConfiguration = Tx_Solr_Util::getSolrConfigurationFromPageId($pageId);
     $indexingConfigurations = t3lib_div::makeInstance('Tx_Solr_IndexQueue_Queue')->getTableIndexingConfigurations($solrConfiguration);
     foreach ($indexingConfigurations as $indexingConfigurationName) {
         $monitoredTable = $indexingConfigurationName;
         if (!empty($solrConfiguration['index.']['queue.'][$indexingConfigurationName . '.']['table'])) {
             // table has been set explicitly. Allows to index the same table with different configurations
             $monitoredTable = $solrConfiguration['index.']['queue.'][$indexingConfigurationName . '.']['table'];
         }
         $monitoredTables[] = $monitoredTable;
         if ($monitoredTable == 'pages') {
             // when monitoring pages, also monitor creation of translations
             $monitoredTables[] = 'pages_language_overlay';
         }
     }
     return array_unique($monitoredTables);
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:28,代码来源:RecordMonitor.php


注:本文中的Tx_Solr_Util::getSolrConfigurationFromPageId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。