Commit 4588a39b authored by Thomas Löffler's avatar Thomas Löffler

[TASK] Sets indexer for extensions and TS config for solr server

* Beautifies TerIndexer and uses new classes
parent 40aac303
<?php
/***************************************************************
* Copyright notice
*
* (c) 2017 Sascha Egerer <sascha@sascha-egerer.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
/**
* This file is part of the TYPO3 CMS project.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
* The TYPO3 project - inspiring people to share!
*/
class Tx_TerFe2_Solr_Indexqueue_TerIndexer extends tx_solr_indexqueue_Indexer {
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Class Tx_TerFe2_Solr_Indexqueue_TerIndexer
*
* @author Sascha Egerer <sascha@sascha-egerer.de>
* @author Thomas Löffler <thomas.loeffler@typo3.org>
* @author Tomas Norre Mikkelsen <tomasnorre@gmail.com>
*/
class Tx_TerFe2_Solr_Indexqueue_TerIndexer extends \ApacheSolrForTypo3\Solr\IndexQueue\Indexer {
/**
* @var Tx_Extbase_Object_ObjectManager
* @var \TYPO3\CMS\Extbase\Object\ObjectManager
*/
protected $objectManager;
/**
* @var Tx_TerFe2_Domain_Repository_ExtensionRepository
* @var Tx_TerFe2_Domain_Repository_ExtensionRepository
*/
protected $extensionRepository;
......@@ -39,18 +39,18 @@ class Tx_TerFe2_Solr_Indexqueue_TerIndexer extends tx_solr_indexqueue_Indexer {
public function __construct(array $options = array()) {
parent::__construct($options);
$this->objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
$this->extensionRepository = $this->objectManager->get('Tx_TerFe2_Domain_Repository_ExtensionRepository');
$this->objectManager = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
$this->extensionRepository = $this->objectManager->get(Tx_TerFe2_Domain_Repository_ExtensionRepository::class);
$this->extensionRepository->setShowInsecure(FALSE);
}
/**
* @param tx_solr_indexqueue_Item $item
* @param \ApacheSolrForTypo3\Solr\IndexQueue\Item $item
* @param int $language
* @return array
*/
public function getFullItemRecord(tx_solr_indexqueue_Item $item, $language = 0) {
public function getFullItemRecord(\ApacheSolrForTypo3\Solr\IndexQueue\Item $item, $language = 0) {
$itemRecord = parent::getFullItemRecord($item, $language);
$itemRecord['minimumTYPO3Version'] = 0;
......
......@@ -3,7 +3,7 @@ plugin {
solr {
host = solr
port = 8983
path = solr/mycore/
path = solr/t3o/
}
templateFiles {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment