TYPO3 CMS  TYPO3_6-2
CrawlerFilesHook.php
Go to the documentation of this file.
1 <?php
3 
25 
34  public function crawler_execute($params, &$pObj) {
35  if (!is_array($params['conf'])) {
36  return;
37  }
38  // Initialize the indexer class:
39  $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
40  $indexerObj->conf = $params['conf'];
41  $indexerObj->init();
42  // Index document:
43  if ($params['alturl']) {
44  $fI = pathinfo($params['document']);
45  $ext = strtolower($fI['extension']);
46  $indexerObj->indexRegularDocument($params['alturl'], TRUE, $params['document'], $ext);
47  } else {
48  $indexerObj->indexRegularDocument($params['document'], TRUE);
49  }
50  // Return OK:
51  return array('content' => array());
52  }
53 }