Add namespaces to all common classes

This commit is contained in:
Sebastian Meyer 2019-03-13 17:55:50 +01:00
parent 52336a8ebe
commit bb7ac1ba6e
32 changed files with 273 additions and 188 deletions

View File

@ -291,7 +291,7 @@ abstract class AbstractPlugin extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
*/
protected function parseTS($string = '') {
$parser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser');
$parser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::class);
$parser->parse($string);

View File

@ -163,7 +163,7 @@ final class Document {
protected $metadataArrayLoaded = FALSE;
/**
* This holds the XML file's METS part as SimpleXMLElement object
* This holds the XML file's METS part as \SimpleXMLElement object
*
* @var \SimpleXMLElement
* @access protected
@ -336,9 +336,9 @@ final class Document {
protected $uid = 0;
/**
* This holds the whole XML file as SimpleXMLElement object
* This holds the whole XML file as \SimpleXMLElement object
*
* @var SimpleXMLElement
* @var \SimpleXMLElement
* @access protected
*/
protected $xml;
@ -784,7 +784,7 @@ final class Document {
$class = $this->formats[$this->dmdSec[$dmdId]['type']]['class'];
// Get the metadata from class.
if (class_exists($class) && ($obj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($class)) instanceof FormatInterface) {
if (class_exists($class) && ($obj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($class)) instanceof MetadataInterface) {
$obj->extractMetadata($this->dmdSec[$dmdId]['xml'], $metadata);
@ -835,10 +835,10 @@ final class Document {
''
);
// We need a DOMDocument here, because SimpleXML doesn't support XPath functions properly.
// We need a \DOMDocument here, because SimpleXML doesn't support XPath functions properly.
$domNode = dom_import_simplexml($this->dmdSec[$dmdId]['xml']);
$domXPath = new DOMXPath($domNode->ownerDocument);
$domXPath = new \DOMXPath($domNode->ownerDocument);
$this->registerNamespaces($domXPath);
@ -848,7 +848,7 @@ final class Document {
// Set metadata field's value(s).
if ($resArray['format'] > 0 && !empty($resArray['xpath']) && ($values = $domXPath->evaluate($resArray['xpath'], $domNode))) {
if ($values instanceof DOMNodeList && $values->length > 0) {
if ($values instanceof \DOMNodeList && $values->length > 0) {
$metadata[$resArray['index_name']] = array ();
@ -858,7 +858,7 @@ final class Document {
}
} elseif (!($values instanceof DOMNodeList)) {
} elseif (!($values instanceof \DOMNodeList)) {
$metadata[$resArray['index_name']] = array (trim((string) $values));
@ -881,11 +881,11 @@ final class Document {
if ($resArray['format'] > 0 && !empty($resArray['xpath_sorting']) && ($values = $domXPath->evaluate($resArray['xpath_sorting'], $domNode))) {
if ($values instanceof DOMNodeList && $values->length > 0) {
if ($values instanceof \DOMNodeList && $values->length > 0) {
$metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values->item(0)->nodeValue);
} elseif (!($values instanceof DOMNodeList)) {
} elseif (!($values instanceof \DOMNodeList)) {
$metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values);
@ -1337,11 +1337,11 @@ final class Document {
}
/**
* Register all available namespaces for a SimpleXMLElement object
* Register all available namespaces for a \SimpleXMLElement object
*
* @access public
*
* @param SimpleXMLElement|DOMXPath &$obj: SimpleXMLElement or DOMXPath object
* @param \SimpleXMLElement|\DOMXPath &$obj: \SimpleXMLElement or \DOMXPath object
*
* @return void
*/
@ -1349,12 +1349,12 @@ final class Document {
$this->loadFormats();
// Do we have a SimpleXMLElement or DOMXPath object?
if ($obj instanceof SimpleXMLElement) {
// Do we have a \SimpleXMLElement or \DOMXPath object?
if ($obj instanceof \SimpleXMLElement) {
$method = 'registerXPathNamespace';
} elseif ($obj instanceof DOMXPath) {
} elseif ($obj instanceof \DOMXPath) {
$method = 'registerNamespace';
@ -1563,7 +1563,7 @@ final class Document {
if (!defined('TYPO3_cliMode')) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
htmlspecialchars(sprintf(Helper::getLL('flash.newCollection'), $collection, $substUid[$collNewUid])),
Helper::getLL('flash.attention', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::INFO,
@ -1624,7 +1624,7 @@ final class Document {
if (!defined('TYPO3_cliMode')) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
htmlspecialchars(sprintf(Helper::getLL('flash.newLibrary'), $owner, $ownerUid)),
Helper::getLL('flash.attention', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::INFO,
@ -1792,7 +1792,7 @@ final class Document {
if (!defined('TYPO3_cliMode')) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
htmlspecialchars(sprintf(Helper::getLL('flash.documentSaved'), $metadata['title'][0], $this->uid)),
Helper::getLL('flash.done', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
@ -2055,7 +2055,7 @@ final class Document {
*
* @access protected
*
* @return SimpleXMLElement The XML's METS part as SimpleXMLElement object
* @return \SimpleXMLElement The XML's METS part as \SimpleXMLElement object
*/
protected function _getMets() {
@ -2743,7 +2743,7 @@ final class Document {
*/
public function __sleep() {
// SimpleXMLElement objects can't be serialized, thus save the XML as string for serialization
// \SimpleXMLElement objects can't be serialized, thus save the XML as string for serialization
$this->asXML = $this->xml->asXML();
return array ('uid', 'pid', 'recordId', 'parentId', 'asXML');
@ -2759,7 +2759,7 @@ final class Document {
*/
public function __toString() {
$xml = new DOMDocument('1.0', 'utf-8');
$xml = new \DOMDocument('1.0', 'utf-8');
$xml->appendChild($xml->importNode(dom_import_simplexml($this->mets), TRUE));

View File

@ -20,11 +20,11 @@ namespace Kitodo\Dlf\Common;
* @subpackage dlf
* @access public
*/
class DocumentList implements ArrayAccess, Countable, Iterator, \TYPO3\CMS\Core\SingletonInterface {
class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Core\SingletonInterface {
/**
* This holds the number of documents in the list
* @see Countable
* @see \Countable
*
* @var integer
* @access protected
@ -33,7 +33,7 @@ class DocumentList implements ArrayAccess, Countable, Iterator, \TYPO3\CMS\Core\
/**
* This holds the list entries in sorted order
* @see ArrayAccess
* @see \ArrayAccess
*
* @var array
* @access protected
@ -50,7 +50,7 @@ class DocumentList implements ArrayAccess, Countable, Iterator, \TYPO3\CMS\Core\
/**
* This holds the current list position
* @see Iterator
* @see \Iterator
*
* @var integer
* @access protected
@ -107,7 +107,7 @@ class DocumentList implements ArrayAccess, Countable, Iterator, \TYPO3\CMS\Core\
/**
* This counts the elements
* @see Countable::count()
* @see \Countable::count()
*
* @access public
*
@ -121,7 +121,7 @@ class DocumentList implements ArrayAccess, Countable, Iterator, \TYPO3\CMS\Core\
/**
* This returns the current element
* @see Iterator::current()
* @see \Iterator::current()
*
* @access public
*
@ -374,7 +374,7 @@ class DocumentList implements ArrayAccess, Countable, Iterator, \TYPO3\CMS\Core\
/**
* This returns the current position
* @see Iterator::key()
* @see \Iterator::key()
*
* @access public
*
@ -473,7 +473,7 @@ class DocumentList implements ArrayAccess, Countable, Iterator, \TYPO3\CMS\Core\
/**
* This increments the current list position
* @see Iterator::next()
* @see \Iterator::next()
*
* @access public
*
@ -487,7 +487,7 @@ class DocumentList implements ArrayAccess, Countable, Iterator, \TYPO3\CMS\Core\
/**
* This checks if an offset exists
* @see ArrayAccess::offsetExists()
* @see \ArrayAccess::offsetExists()
*
* @access public
*
@ -503,7 +503,7 @@ class DocumentList implements ArrayAccess, Countable, Iterator, \TYPO3\CMS\Core\
/**
* This returns the element at the given offset
* @see ArrayAccess::offsetGet()
* @see \ArrayAccess::offsetGet()
*
* @access public
*
@ -533,7 +533,7 @@ class DocumentList implements ArrayAccess, Countable, Iterator, \TYPO3\CMS\Core\
/**
* This sets the element at the given offset
* @see ArrayAccess::offsetSet()
* @see \ArrayAccess::offsetSet()
*
* @access public
*
@ -655,7 +655,7 @@ class DocumentList implements ArrayAccess, Countable, Iterator, \TYPO3\CMS\Core\
/**
* This resets the list position
* @see Iterator::rewind()
* @see \Iterator::rewind()
*
* @access public
*
@ -803,7 +803,7 @@ class DocumentList implements ArrayAccess, Countable, Iterator, \TYPO3\CMS\Core\
/**
* This unsets the element at the given offset
* @see ArrayAccess::offsetUnset()
* @see \ArrayAccess::offsetUnset()
*
* @access public
*
@ -824,7 +824,7 @@ class DocumentList implements ArrayAccess, Countable, Iterator, \TYPO3\CMS\Core\
/**
* This checks if the current list position is valid
* @see Iterator::valid()
* @see \Iterator::valid()
*
* @access public
*

View File

@ -1,4 +1,6 @@
<?php
namespace Kitodo\Dlf\Common;
/**
* (c) Kitodo. Key to digital objects e.V. <contact@kitodo.org>
*
@ -9,19 +11,16 @@
* LICENSE.txt file that was distributed with this source code.
*/
use Kitodo\Dlf\Common\Document;
use Kitodo\Dlf\Common\Helper;
/**
* Document Type Check for usage as Typoscript Condition.
* Document Type Checker for usage as Typoscript Condition.
* @see dlf/ext_localconf.php->user_dlf_docTypeCheck()
*
* @author Alexander Bigga <alexander.bigga@slub-dresden.de>
* @package TYPO3
* @subpackage tx_dlf
* @subpackage dlf
* @access public
*/
class tx_dlf_doctype {
class DocumentTypeCheck {
/**
* This holds the current document
@ -173,7 +172,7 @@ class tx_dlf_doctype {
if (TYPO3_DLOG) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_doctype->loadDocument()] Failed to load document with UID "'.$this->piVars['id'].'"', $this->extKey, SYSLOG_SEVERITY_WARNING);
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[\Kitodo\Dlf\Common\DocumentTypeCheck->loadDocument()] Failed to load document with UID "'.$this->piVars['id'].'"', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
@ -208,7 +207,7 @@ class tx_dlf_doctype {
if (TYPO3_DLOG) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_doctype->loadDocument()] Failed to load document with record ID "'.$this->piVars['recordId'].'"', $this->extKey, SYSLOG_SEVERITY_WARNING);
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[\Kitodo\Dlf\Common\DocumentTypeCheck->loadDocument()] Failed to load document with record ID "'.$this->piVars['recordId'].'"', $this->extKey, SYSLOG_SEVERITY_WARNING);
}

View File

@ -27,10 +27,10 @@ interface FulltextInterface {
*
* @access public
*
* @param SimpleXMLElement $xml: The XML to extract the metadata from
* @param \SimpleXMLElement $xml: The XML to extract the metadata from
*
* @return string The raw unformatted fulltext
*/
public function getRawText(SimpleXMLElement $xml);
public function getRawText(\SimpleXMLElement $xml);
}

View File

@ -49,7 +49,7 @@ class Helper {
*/
public static function addMessage($message) {
$flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService');
$flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessageService::class);
$flashMessageService->getMessageQueueByIdentifier()->enqueue($message);
@ -337,7 +337,7 @@ class Helper {
if (TYPO3_MODE === 'FE' || TYPO3_MODE === 'BE') {
// Initialize backend session with CLI user's rights.
$userObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
$userObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class);
$userObj->dontSetCookie = TRUE;
@ -915,7 +915,7 @@ class Helper {
public static function processDB(array $data = array (), array $cmd = array (), $reverseOrder = FALSE, $be_user = FALSE) {
// Instantiate TYPO3 core engine.
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
// Set some configuration variables.
$tce->stripslashes_values = FALSE;
@ -997,7 +997,7 @@ class Helper {
*/
public static function renderFlashMessages() {
$flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService');
$flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessageService::class);
$content = '';
@ -1300,7 +1300,7 @@ class Helper {
} else {
$pageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
$pageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Page\PageRepository::class);
$GLOBALS['TSFE']->includeTCA();

View File

@ -180,7 +180,7 @@ class Indexer {
if (!$errors) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
htmlspecialchars(sprintf(Helper::getLL('flash.documentIndexed'), $resArray['title'], $doc->uid)),
Helper::getLL('flash.done', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
@ -190,7 +190,7 @@ class Indexer {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
htmlspecialchars(sprintf(Helper::getLL('flash.documentNotIndexed'), $resArray['title'], $doc->uid)),
Helper::getLL('flash.error', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -205,12 +205,12 @@ class Indexer {
return $errors;
} catch (Exception $e) {
} catch (\Exception $e) {
if (!defined('TYPO3_cliMode')) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
Helper::getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()),
Helper::getLL('flash.error', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -236,7 +236,7 @@ class Indexer {
if (!defined('TYPO3_cliMode')) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
Helper::getLL('flash.solrNoConnection', TRUE),
Helper::getLL('flash.warning', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
@ -301,12 +301,12 @@ class Indexer {
$updateQuery->addCommit();
self::$solr->service->update($updateQuery);
} catch (Exception $e) {
} catch (\Exception $e) {
if (!defined('TYPO3_cliMode')) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
Helper::getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()),
Helper::getLL('flash.error', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -332,7 +332,7 @@ class Indexer {
if (!defined('TYPO3_cliMode')) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
Helper::getLL('flash.solrNoConnection', TRUE),
Helper::getLL('flash.error', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -356,7 +356,7 @@ class Indexer {
if (!defined('TYPO3_cliMode')) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
htmlspecialchars(sprintf(Helper::getLL('flash.documentDeleted'), $title, $uid)),
Helper::getLL('flash.done', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
@ -632,12 +632,12 @@ class Indexer {
$updateQuery->addDocument($solrDoc);
self::$solr->service->update($updateQuery);
} catch (Exception $e) {
} catch (\Exception $e) {
if (!defined('TYPO3_cliMode')) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
Helper::getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()),
Helper::getLL('flash.error', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -799,12 +799,12 @@ class Indexer {
$updateQuery->addDocument($solrDoc);
self::$solr->service->update($updateQuery);
} catch (Exception $e) {
} catch (\Exception $e) {
if (!defined('TYPO3_cliMode')) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
Helper::getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()),
Helper::getLL('flash.error', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,

View File

@ -12,7 +12,7 @@ namespace Kitodo\Dlf\Common;
*/
/**
* Format interface for the 'dlf' extension.
* Metadata interface for the 'dlf' extension.
*
* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
* @package TYPO3
@ -20,18 +20,18 @@ namespace Kitodo\Dlf\Common;
* @access public
* @abstract
*/
interface FormatInterface {
interface MetadataInterface {
/**
* This extracts metadata from XML
*
* @access public
*
* @param SimpleXMLElement $xml: The XML to extract the metadata from
* @param \SimpleXMLElement $xml: The XML to extract the metadata from
* @param array &$metadata: The metadata array to fill
*
* @return void
*/
public function extractMetadata(SimpleXMLElement $xml, array &$metadata);
public function extractMetadata(\SimpleXMLElement $xml, array &$metadata);
}

View File

@ -105,7 +105,7 @@ class Solr {
*/
public static function escapeQuery($query) {
$helper = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Solarium\Core\Query\Helper');
$helper = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Solarium\Core\Query\Helper::class);
// Escape query phrase or term.
if (preg_match('/^".*"$/', $query)) {
@ -661,7 +661,7 @@ class Solr {
);
// Instantiate Solarium\Client class.
$this->service = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Solarium\Client', $config);
$this->service = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Solarium\Client::class, $config);
// Check if connection is established.
$ping = $this->service->createPing();
@ -676,7 +676,7 @@ class Solr {
// Instantiation successful!
$this->ready = TRUE;
} catch (Exception $e) {
} catch (\Exception $e) {
// Nothing to do here.

View File

@ -1,4 +1,6 @@
<?php
namespace Kitodo\Dlf\Formats;
/**
* (c) Kitodo. Key to digital objects e.V. <contact@kitodo.org>
*
@ -10,25 +12,25 @@
*/
/**
* Fulltext format class 'tx_dlf_alto' for the 'dlf' extension.
* Fulltext ALTO format class for the 'dlf' extension.
*
* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
* @package TYPO3
* @subpackage tx_dlf
* @subpackage dlf
* @access public
*/
class tx_dlf_alto implements \Kitodo\Dlf\Common\FulltextInterface {
class Alto implements \Kitodo\Dlf\Common\FulltextInterface {
/**
* This extracts the fulltext data from ALTO XML
*
* @access public
*
* @param SimpleXMLElement $xml: The XML to extract the raw text from
* @param \SimpleXMLElement $xml: The XML to extract the raw text from
*
* @return string The raw unformatted fulltext
*/
public function getRawText(SimpleXMLElement $xml) {
public function getRawText(\SimpleXMLElement $xml) {
$xml->registerXPathNamespace('alto', 'http://www.loc.gov/standards/alto/ns-v2#');

View File

@ -1,4 +1,6 @@
<?php
namespace Kitodo\Dlf\Formats;
/**
* (c) Kitodo. Key to digital objects e.V. <contact@kitodo.org>
*
@ -10,26 +12,26 @@
*/
/**
* Metadata format class 'tx_dlf_mods' for the 'dlf' extension.
* Metadata MODS format class for the 'dlf' extension.
*
* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
* @package TYPO3
* @subpackage tx_dlf
* @subpackage dlf
* @access public
*/
class tx_dlf_mods implements \Kitodo\Dlf\Common\FormatInterface {
class Mods implements \Kitodo\Dlf\Common\MetadataInterface {
/**
* This extracts the essential MODS metadata from XML
*
* @access public
*
* @param SimpleXMLElement $xml: The XML to extract the metadata from
* @param \SimpleXMLElement $xml: The XML to extract the metadata from
* @param array &$metadata: The metadata array to fill
*
* @return void
*/
public function extractMetadata(SimpleXMLElement $xml, array &$metadata) {
public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) {
$xml->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3');

View File

@ -1,4 +1,6 @@
<?php
namespace Kitodo\Dlf\Formats;
/**
* (c) Kitodo. Key to digital objects e.V. <contact@kitodo.org>
*
@ -10,26 +12,26 @@
*/
/**
* Metadata format class 'tx_dlf_teihdr' for the 'dlf' extension.
* Metadata TEI-Header format class for the 'dlf' extension.
*
* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
* @package TYPO3
* @subpackage tx_dlf
* @subpackage dlf
* @access public
*/
class tx_dlf_teihdr implements \Kitodo\Dlf\Common\FormatInterface {
class TeiHeader implements \Kitodo\Dlf\Common\MetadataInterface {
/**
* This extracts the essential TEIHDR metadata from XML
*
* @access public
*
* @param SimpleXMLElement $xml: The XML to extract the metadata from
* @param \SimpleXMLElement $xml: The XML to extract the metadata from
* @param array &$metadata: The metadata array to fill
*
* @return void
*/
public function extractMetadata(SimpleXMLElement $xml, array &$metadata) {
public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) {
$xml->registerXPathNamespace('teihdr', 'http://www.tei-c.org/ns/1.0');

View File

@ -1,4 +1,6 @@
<?php
namespace Kitodo\Dlf\Hooks;
/**
* (c) Kitodo. Key to digital objects e.V. <contact@kitodo.org>
*
@ -13,14 +15,14 @@ use Kitodo\Dlf\Common\Helper;
use Kitodo\Dlf\Common\Solr;
/**
* Hooks and helper for the extension manager.
* Hooks and helper for \TYPO3\CMS\Core\TypoScript\ConfigurationForm
*
* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
* @package TYPO3
* @subpackage tx_dlf
* @subpackage dlf
* @access public
*/
class tx_dlf_em {
class ConfigurationForm {
/**
* This holds the current configuration
@ -84,7 +86,7 @@ class tx_dlf_em {
if (is_array($status)) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
sprintf($GLOBALS['LANG']->getLL('solr.status'), (string) $status[0]),
$GLOBALS['LANG']->getLL('solr.connected'),
($status[0] == 0 ? \TYPO3\CMS\Core\Messaging\FlashMessage::OK : \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING),
@ -100,7 +102,7 @@ class tx_dlf_em {
}
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
sprintf($GLOBALS['LANG']->getLL('solr.error'), $url),
$GLOBALS['LANG']->getLL('solr.notConnected'),
\TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
@ -157,7 +159,7 @@ class tx_dlf_em {
$usrUid = $resArray['uid'];
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.usrOkayMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.usrOkay'),
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
@ -189,7 +191,7 @@ class tx_dlf_em {
$usrUid = $resArray['uid'];
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.usrConfiguredMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.usrConfigured'),
\TYPO3\CMS\Core\Messaging\FlashMessage::INFO,
@ -199,7 +201,7 @@ class tx_dlf_em {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotConfiguredMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotConfigured'),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -211,7 +213,7 @@ class tx_dlf_em {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotConfiguredMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotConfigured'),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -246,7 +248,7 @@ class tx_dlf_em {
$usrUid = $substUid[$tempUid];
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.usrCreatedMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.usrCreated'),
\TYPO3\CMS\Core\Messaging\FlashMessage::INFO,
@ -256,7 +258,7 @@ class tx_dlf_em {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotCreatedMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotCreated'),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -268,7 +270,7 @@ class tx_dlf_em {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotCreatedMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotCreated'),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -368,7 +370,7 @@ class tx_dlf_em {
$grpUid = $resArray['uid'];
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.grpOkayMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.grpOkay'),
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
@ -403,7 +405,7 @@ class tx_dlf_em {
$grpUid = $resArray['uid'];
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.grpConfiguredMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.grpConfigured'),
\TYPO3\CMS\Core\Messaging\FlashMessage::INFO,
@ -413,7 +415,7 @@ class tx_dlf_em {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotConfiguredMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotConfigured'),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -425,7 +427,7 @@ class tx_dlf_em {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotConfiguredMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotConfigured'),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -461,7 +463,7 @@ class tx_dlf_em {
$grpUid = $substUid[$tempUid];
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.grpCreatedMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.grpCreated'),
\TYPO3\CMS\Core\Messaging\FlashMessage::INFO,
@ -471,7 +473,7 @@ class tx_dlf_em {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotCreatedMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotCreated'),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -483,7 +485,7 @@ class tx_dlf_em {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotCreatedMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotCreated'),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -528,7 +530,7 @@ class tx_dlf_em {
if (is_executable(PATH_typo3.'cli_dispatch.phpsh')) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.cliOkayMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.cliOkay'),
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
@ -538,7 +540,7 @@ class tx_dlf_em {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('cliUserGroup.cliNotOkayMsg'),
$GLOBALS['LANG']->getLL('cliUserGroup.cliNotOkay'),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -595,7 +597,7 @@ class tx_dlf_em {
'type' => 'MODS',
'root' => 'mods',
'namespace' => 'http://www.loc.gov/mods/v3',
'class' => 'tx_dlf_mods'
'class' => 'Kitodo\\Dlf\\Formats\\Mods'
);
}
@ -608,7 +610,7 @@ class tx_dlf_em {
'type' => 'TEIHDR',
'root' => 'teiHeader',
'namespace' => 'http://www.tei-c.org/ns/1.0',
'class' => 'tx_dlf_teihdr'
'class' => 'Kitodo\\Dlf\\Formats\\TeiHeader'
);
}
@ -621,7 +623,7 @@ class tx_dlf_em {
'type' => 'ALTO',
'root' => 'alto',
'namespace' => 'http://www.loc.gov/standards/alto/ns-v2#',
'class' => 'tx_dlf_alto'
'class' => 'Kitodo\\Dlf\\Formats\\Alto'
);
}
@ -634,7 +636,7 @@ class tx_dlf_em {
if (!empty($substUid)) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('metadataFormats.nsCreatedMsg'),
$GLOBALS['LANG']->getLL('metadataFormats.nsCreated'),
\TYPO3\CMS\Core\Messaging\FlashMessage::INFO,
@ -644,7 +646,7 @@ class tx_dlf_em {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('metadataFormats.nsNotCreatedMsg'),
$GLOBALS['LANG']->getLL('metadataFormats.nsNotCreated'),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -656,7 +658,7 @@ class tx_dlf_em {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('metadataFormats.nsOkayMsg'),
$GLOBALS['LANG']->getLL('metadataFormats.nsOkay'),
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,

View File

@ -1,4 +1,6 @@
<?php
namespace Kitodo\Dlf\Hooks;
/**
* (c) Kitodo. Key to digital objects e.V. <contact@kitodo.org>
*
@ -14,14 +16,14 @@ use Kitodo\Dlf\Common\Helper;
use Kitodo\Dlf\Common\Solr;
/**
* Hooks and helper for the '\TYPO3\CMS\Core\DataHandling\DataHandler' library.
* Hooks and helper for \TYPO3\CMS\Core\DataHandling\DataHandler
*
* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
* @package TYPO3
* @subpackage tx_dlf
* @subpackage dlf
* @access public
*/
class tx_dlf_tcemain {
class DataHandler {
/**
* Field post-processing hook for the process_datamap() method.
@ -161,7 +163,7 @@ class tx_dlf_tcemain {
if (TYPO3_DLOG) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_tcemain->processDatamap_postProcessFieldArray('.$status.', '.$table.', '.$id.', [data], ['.get_class($pObj).'])] Could not create new Apache Solr core "dlfCore'.$coreNumber.'"', $this->extKey, SYSLOG_SEVERITY_ERROR, $fieldArray);
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[\Kitodo\Dlf\Hooks\DataHandler->processDatamap_postProcessFieldArray('.$status.', '.$table.', '.$id.', [data], ['.get_class($pObj).'])] Could not create new Apache Solr core "dlfCore'.$coreNumber.'"', $this->extKey, SYSLOG_SEVERITY_ERROR, $fieldArray);
}
@ -269,7 +271,7 @@ class tx_dlf_tcemain {
if (TYPO3_DLOG) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_tcemain->processDatamap_postProcessFieldArray('.$status.', '.$table.', '.$id.', [data], ['.get_class($pObj).'])] Prevented change of "index_name" for UID "'.$id.'" in table "'.$table.'"', $this->extKey, SYSLOG_SEVERITY_NOTICE, $fieldArray);
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[\Kitodo\Dlf\Hooks\DataHandler->processDatamap_postProcessFieldArray('.$status.', '.$table.', '.$id.', [data], ['.get_class($pObj).'])] Prevented change of "index_name" for UID "'.$id.'" in table "'.$table.'"', $this->extKey, SYSLOG_SEVERITY_NOTICE, $fieldArray);
}
@ -348,7 +350,7 @@ class tx_dlf_tcemain {
if (TYPO3_DLOG) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_tcemain->processDatamap_afterDatabaseOperations('.$status.', '.$table.', '.$id.', [data], ['.get_class($pObj).'])] Failed to re-index document with UID "'.$id.'"', $this->extKey, SYSLOG_SEVERITY_ERROR, $fieldArray);
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[\Kitodo\Dlf\Hooks\DataHandler->processDatamap_afterDatabaseOperations('.$status.', '.$table.', '.$id.', [data], ['.get_class($pObj).'])] Failed to re-index document with UID "'.$id.'"', $this->extKey, SYSLOG_SEVERITY_ERROR, $fieldArray);
}
@ -434,7 +436,7 @@ class tx_dlf_tcemain {
if (TYPO3_DLOG) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_tcemain->processCmdmap_postProcess('.$command.', '.$table.', '.$id.', '.$value.', ['.get_class($pObj).'])] Failed to re-index document with UID "'.$id.'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[\Kitodo\Dlf\Hooks\DataHandler->processCmdmap_postProcess('.$command.', '.$table.', '.$id.', '.$value.', ['.get_class($pObj).'])] Failed to re-index document with UID "'.$id.'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
}

View File

@ -1,4 +1,6 @@
<?php
namespace Kitodo\Dlf\Hooks;
/**
* (c) Kitodo. Key to digital objects e.V. <contact@kitodo.org>
*
@ -12,14 +14,14 @@
use Kitodo\Dlf\Common\Helper;
/**
* Hooks and helper for the '\TYPO3\CMS\Backend\Form\FormEngine' library.
* Hooks and helper for \TYPO3\CMS\Backend\Form\FormEngine
*
* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
* @package TYPO3
* @subpackage tx_dlf
* @subpackage dlf
* @access public
*/
class tx_dlf_tceforms {
class FormEngine {
/**
* Helper to display document's thumbnail for table "tx_dlf_documents"

View File

@ -1,4 +1,6 @@
<?php
namespace Kitodo\Dlf\Hooks;
/**
* (c) Kitodo. Key to digital objects e.V. <contact@kitodo.org>
*
@ -10,14 +12,14 @@
*/
/**
* Hooks and hacks for Kitodo.Production.
* Hooks and hacks for Kitodo.Production
*
* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
* @package TYPO3
* @subpackage tx_dlf
* @subpackage dlf
* @access public
*/
class tx_dlf_hacks {
class KitodoProductionHacks {
/**
* Hook for \Kitodo\Dlf\Common\Document::__construct()
@ -26,12 +28,12 @@ class tx_dlf_hacks {
*
* @access public
*
* @param SimpleXMLElement &$xml: The XML object
* @param \SimpleXMLElement &$xml: The XML object
* @param mixed $record_id: The record identifier
*
* @return void
*/
public function construct_postProcessRecordId(SimpleXMLElement &$xml, &$record_id) {
public function construct_postProcessRecordId(\SimpleXMLElement &$xml, &$record_id) {
if (!$record_id) {

View File

@ -212,7 +212,7 @@ return array (
'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_documents.thumbnail',
'config' => array (
'type' => 'user',
'userFunc' => 'EXT:dlf/Classes/Hooks/class.tx_dlf_tceforms.php:tx_dlf_tceforms->displayThumbnail',
'userFunc' => 'EXT:dlf/Classes/Hooks/FormEngine.php:FormEngine->displayThumbnail',
),
),
'metadata' => array (

View File

@ -81,7 +81,7 @@ class ext_update {
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'tx_dlf_metadata.uid AS uid',
'tx_dlf_metadata',
'tx_dlf_metadata.format=0 AND NOT tx_dlf_metadata.xpath=\'\''.Helper::whereClause('tx_dlf_metadata'),
'tx_dlf_metadata.format=0 AND NOT tx_dlf_metadata.xpath=""'.Helper::whereClause('tx_dlf_metadata'),
'',
'',
''
@ -119,21 +119,52 @@ class ext_update {
}
if ($this->oldIndexRelatedTableNames()) {
$this->renameIndexRelatedColumns();
}
if ($this->solariumSolrUpdateRequired()) {
$this->doSolariumSolrUpdate();
}
if (count($this->oldFormatClasses())) {
$this->updateFormatClasses();
}
return $this->content;
}
/**
* Check for old format classes
*
* @access protected
*
* @return boolean true if old format classes exist
*/
protected function oldFormatClasses() {
$oldRecords = array ();
// Get all records with outdated configuration.
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'tx_dlf_formats.uid AS uid,tx_dlf_formats.type AS type',
'tx_dlf_formats',
'tx_dlf_formats.class NOT LIKE "%\\%"'.Helper::whereClause('tx_dlf_formats'),
'',
'',
''
);
while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
$oldRecords[$resArray['uid']] = $resArray['type'];
}
return $oldRecords;
}
/**
* Check for old index related colums
*
@ -189,7 +220,7 @@ class ext_update {
if ($result) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('update.copyIndexRelatedColumnsOkay', TRUE),
$GLOBALS['LANG']->getLL('update.copyIndexRelatedColumns', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
@ -199,7 +230,7 @@ class ext_update {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('update.copyIndexRelatedColumnsNotOkay', TRUE),
$GLOBALS['LANG']->getLL('update.copyIndexRelatedColumns', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
@ -212,6 +243,43 @@ class ext_update {
}
/**
* Update all outdated format records
*
* @access protected
*
* @return void
*/
protected function updateFormatClasses() {
$oldRecords = $this->oldFormatClasses();
$newValues = array (
'ALTO' => 'Kitodo\\Dlf\\Formats\\Alto',
'MODS' => 'Kitodo\\Dlf\\Formats\\Mods',
'TEIHDR' => 'Kitodo\\Dlf\\Formats\\TeiHeader'
);
foreach ($oldRecords as $uid => $type) {
$sqlQuery = 'UPDATE tx_dlf_formats SET class="'.$newValues[$type].'" WHERE uid='.$uid;
$GLOBALS['TYPO3_DB']->sql_query($sqlQuery);
}
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('update.FormatClassesOkay', TRUE),
$GLOBALS['LANG']->getLL('update.FormatClasses', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
FALSE
);
$this->content .= $message->render();
}
/**
* Update all outdated metadata configuration records
*
@ -266,7 +334,7 @@ class ext_update {
if (!empty($substUids)) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('update.metadataConfigOkay', TRUE),
$GLOBALS['LANG']->getLL('update.metadataConfig', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
@ -276,7 +344,7 @@ class ext_update {
} else {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('update.metadataConfigNotOkay', TRUE),
$GLOBALS['LANG']->getLL('update.metadataConfig', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
@ -397,7 +465,7 @@ class ext_update {
}
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('update.solariumSolrUpdateNotOkay', TRUE),
sprintf($GLOBALS['LANG']->getLL('update.solariumSolrUpdate', TRUE), $resArray['index_name']),
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
@ -413,7 +481,7 @@ class ext_update {
}
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
\TYPO3\CMS\Core\Messaging\FlashMessage::class,
$GLOBALS['LANG']->getLL('update.solariumSolrUpdateOkay', TRUE),
$GLOBALS['LANG']->getLL('update.solariumSolrUpdate', TRUE),
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,

View File

@ -1,7 +1,7 @@
# cat=Basic; type=user[EXT:dlf/Classes/Hooks/class.tx_dlf_em.php:tx_dlf_em->checkMetadataFormats]; label=LLL:EXT:dlf/locallang.xml:config.metadataFormats
# cat=Basic; type=user[EXT:dlf/Classes/Hooks/ConfigurationForm.php:ConfigurationForm->checkMetadataFormats]; label=LLL:EXT:dlf/locallang.xml:config.metadataFormats
metadataFormats = 0
# cat=Basic; type=user[EXT:dlf/Classes/Hooks/class.tx_dlf_em.php:tx_dlf_em->checkCliUserGroup]; label=LLL:EXT:dlf/locallang.xml:config.cliUserGroup
# cat=Basic; type=user[EXT:dlf/Classes/Hooks/ConfigurationForm.php:ConfigurationForm->checkCliUserGroup]; label=LLL:EXT:dlf/locallang.xml:config.cliUserGroup
cliUserGroup = 0
# cat=Basic; type=boolean; label=LLL:EXT:dlf/locallang.xml:config.makeCliUserGroup
@ -34,7 +34,7 @@ fileGrpFulltext = FULLTEXT
# cat=Files; type=string; label=LLL:EXT:dlf/locallang.xml:config.fileGrpAudio
fileGrpAudio = AUDIO
# cat=Solr; type=user[EXT:dlf/Classes/Hooks/class.tx_dlf_em.php:tx_dlf_em->checkSolrConnection]; label=LLL:EXT:dlf/locallang.xml:config.solrConnect
# cat=Solr; type=user[EXT:dlf/Classes/Hooks/ConfigurationForm.php:ConfigurationForm->checkSolrConnection]; label=LLL:EXT:dlf/locallang.xml:config.solrConnect
solrConnect = 0
# cat=Solr; type=boolean; label=LLL:EXT:dlf/locallang.xml:config.solrHttps

View File

@ -60,11 +60,11 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CM
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_toolsImagedownload'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsImagedownload';
// Register hooks.
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = 'EXT:'.$_EXTKEY.'/Classes/Hooks/class.tx_dlf_tcemain.php:tx_dlf_tcemain';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = 'EXT:'.$_EXTKEY.'/Classes/Hooks/DataHandler.php:DataHandler';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = 'EXT:'.$_EXTKEY.'/Classes/Hooks/class.tx_dlf_tcemain.php:tx_dlf_tcemain';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = 'EXT:'.$_EXTKEY.'/Classes/Hooks/DataHandler.php:DataHandler';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Common/Document.php']['hookClass'][] = 'EXT:'.$_EXTKEY.'/Classes/Hooks/class.tx_dlf_hacks.php:tx_dlf_hacks';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Common/Document.php']['hookClass'][] = 'EXT:'.$_EXTKEY.'/Classes/Hooks/KitodoProductionHacks.php:KitodoProductionHacks';
// Register command line scripts.
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = array (
@ -94,7 +94,7 @@ if (TYPO3_MODE === 'FE') {
*/
function user_dlf_docTypeCheck($type) {
$hook = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_dlf_doctype');
$hook = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Kitodo\Dlf\Common\DocumentTypeCheck::class);
return ($hook->getDocType() === $type);

View File

@ -186,11 +186,11 @@
<label index="solr.notConnected">Connection failed!</label>
<label index="solr.error">Apache Solr was not reachable under &lt;strong&gt;%s&lt;/strong&gt;.</label>
<label index="metadataFormats.nsOkay">Default namespaces found!</label>
<label index="metadataFormats.nsOkayMsg">The namespace definitions for MODS and TEIHDR do exist.</label>
<label index="metadataFormats.nsOkayMsg">The namespace definitions for MODS, TEIHDR and ALTO do exist.</label>
<label index="metadataFormats.nsCreated">Default namespaces created successfully!</label>
<label index="metadataFormats.nsCreatedMsg">The namespace definitions for MODS and/or TEIHDR were created properly.</label>
<label index="metadataFormats.nsCreatedMsg">The namespace definitions for MODS, TEIHDR and/or ALTO were created properly.</label>
<label index="metadataFormats.nsNotCreated">Default namespaces not found!</label>
<label index="metadataFormats.nsNotCreatedMsg">The namespace definitions for MODS and/or TEIHDR do not exist and could not be created.</label>
<label index="metadataFormats.nsNotCreatedMsg">The namespace definitions for MODS, TEIHDR and/or ALTO do not exist and could not be created.</label>
<label index="cliUserGroup.usrRealName">Kitodo.Presentation command line indexer</label>
<label index="cliUserGroup.usrOkay">User "_cli_dlf" found!</label>
<label index="cliUserGroup.usrOkayMsg">The backend user for the command line indexer exists and is configured properly.</label>
@ -226,6 +226,8 @@
<label index="update.solariumSolrUpdate">Re-adding cores to Solr...</label>
<label index="update.solariumSolrUpdateOkay">...successfully completed! Please re-index your documents now.</label>
<label index="update.solariumSolrUpdateNotOkay">...failed for core %s! Please check your Solr configuration.</label>
<label index="update.FormatClasses">Switching format classes to namespaces...</label>
<label index="update.FormatClassesOkay">...successfully completed! Please check all format records in the page tree's root.</label>
</languageKey>
<languageKey index="de" type="array">
<label index="tx_dlf_actionlog">Aktionsprotokoll</label>
@ -399,11 +401,11 @@
<label index="solr.notConnected">Verbindung fehlgeschlagen!</label>
<label index="solr.error">Apache Solr ist unter &lt;strong&gt;%s&lt;/strong&gt; nicht erreichbar.</label>
<label index="metadataFormats.nsOkay">Standard-Namensräume gefunden!</label>
<label index="metadataFormats.nsOkayMsg">Die Standard-Namensräume für MODS und TEIHDR sind definiert.</label>
<label index="metadataFormats.nsOkayMsg">Die Standard-Namensräume für MODS, TEIHDR und ALTO sind definiert.</label>
<label index="metadataFormats.nsCreated">Standard-Namensräume erfolgreich angelegt!</label>
<label index="metadataFormats.nsCreatedMsg">Die Standard-Namensräume für MODS und/oder TEIHDR wurden erfolgreich definiert.</label>
<label index="metadataFormats.nsCreatedMsg">Die Standard-Namensräume für MODS, TEIHDR und/oder ALTO wurden erfolgreich definiert.</label>
<label index="metadataFormats.nsNotCreated">Standard-Namensräume nicht gefunden!</label>
<label index="metadataFormats.nsNotCreatedMsg">Die Standard-Namensräume für MODS und/oder TEIHDR konnten nicht definiert werden.</label>
<label index="metadataFormats.nsNotCreatedMsg">Die Standard-Namensräume für MODS, TEIHDR und/oder ALTO konnten nicht definiert werden.</label>
<label index="cliUserGroup.usrRealName">Kitodo.Presentation Kommandozeilen-Indexierungsdienst</label>
<label index="cliUserGroup.usrOkay">Nutzer "_cli_dlf" gefunden!</label>
<label index="cliUserGroup.usrOkayMsg">Der Nutzer für den Kommandozeilen-Indexierungsdienst ist korrekt konfiguriert und aktiviert.</label>
@ -439,6 +441,8 @@
<label index="update.solariumSolrUpdate">Hinzufügen der Solr Kerne...</label>
<label index="update.solariumSolrUpdateOkay">...erfolgreich beendet! Bitte re-indexieren Sie jetzt alle Dokumente.</label>
<label index="update.solariumSolrUpdateNotOkay">...für Kern %s fehlgeschlagen! Bitte überprüfen Sie die Solr-Konfiguration.</label>
<label index="update.FormatClasses">Format-Klassen auf Namensräume umstellen...</label>
<label index="update.FormatClassesOkay">...erfolgreich beendet! Bitte prüfen Sie dennoch alle Formateinträge im Wurzelknoten des Seitenbaums.</label>
</languageKey>
</data>
</T3locallang>

View File

@ -796,7 +796,7 @@ class tx_dlf_basket extends \Kitodo\Dlf\Common\AbstractPlugin {
$from = \TYPO3\CMS\Core\Utility\MailUtility::getSystemFrom();
// send mail
$mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Mail\\MailMessage');
$mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\MailMessage::class);
// Prepare and send the message
$mail

View File

@ -49,7 +49,7 @@
<config>
<type>select</type>
<items type="array"/>
<itemsProcFunc>tx_dlf_tceforms-&gt;itemsProcFunc_collectionList</itemsProcFunc>
<itemsProcFunc>Kitodo\\Dlf\\Hooks\\FormEngine-&gt;itemsProcFunc_collectionList</itemsProcFunc>
<size>5</size>
<autoSizeMax>15</autoSizeMax>
<maxitems>1024</maxitems>
@ -65,7 +65,7 @@
<config>
<type>select</type>
<items type="array"></items>
<itemsProcFunc>tx_dlf_tceforms->itemsProcFunc_solrList</itemsProcFunc>
<itemsProcFunc>Kitodo\\Dlf\\Hooks\\FormEngine->itemsProcFunc_solrList</itemsProcFunc>
<size>1</size>
<maxitems>1</maxitems>
<minitems>1</minitems>

View File

@ -42,7 +42,7 @@ class tx_dlf_feeds extends \Kitodo\Dlf\Common\AbstractPlugin {
$this->setCache(FALSE);
// Create XML document.
$rss = new DOMDocument('1.0', 'utf-8');
$rss = new \DOMDocument('1.0', 'utf-8');
// Add mandatory root element.
$root = $rss->createElement('rss');

View File

@ -49,7 +49,7 @@
<config>
<type>select</type>
<items type="array"></items>
<itemsProcFunc>tx_dlf_tceforms->itemsProcFunc_collectionList</itemsProcFunc>
<itemsProcFunc>Kitodo\\Dlf\\Hooks\\FormEngine->itemsProcFunc_collectionList</itemsProcFunc>
<size>5</size>
<autoSizeMax>15</autoSizeMax>
<maxitems>1024</maxitems>
@ -75,7 +75,7 @@
<config>
<type>select</type>
<items type="array"></items>
<itemsProcFunc>tx_dlf_tceforms->itemsProcFunc_libraryList</itemsProcFunc>
<itemsProcFunc>Kitodo\\Dlf\\Hooks\\FormEngine->itemsProcFunc_libraryList</itemsProcFunc>
<size>1</size>
<maxitems>1</maxitems>
<minitems>0</minitems>

View File

@ -36,7 +36,7 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
/**
* This holds the OAI DOM object
*
* @var DOMDocument
* @var \DOMDocument
* @access protected
*/
protected $oai;
@ -93,7 +93,7 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
*
* @param string $type: Error type
*
* @return DOMElement XML node to add to the OAI response
* @return \DOMElement XML node to add to the OAI response
*/
protected function error($type) {
$this->error = TRUE;
@ -142,7 +142,7 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
*
* @param array $metadata: The metadata array
*
* @return DOMElement XML node to add to the OAI response
* @return \DOMElement XML node to add to the OAI response
*/
protected function getDcData(array $metadata) {
@ -209,7 +209,7 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
*
* @param array $metadata: The metadata array
*
* @return DOMElement XML node to add to the OAI response
* @return \DOMElement XML node to add to the OAI response
*/
protected function getEpicurData(array $metadata) {
@ -308,21 +308,21 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
*
* @param array $metadata: The metadata array
*
* @return DOMElement XML node to add to the OAI response
* @return \DOMElement XML node to add to the OAI response
*/
protected function getMetsData(array $metadata) {
$mets = NULL;
// Load METS file.
$xml = new DOMDocument();
$xml = new \DOMDocument();
if ($xml->load($metadata['location'])) {
// Get root element.
$root = $xml->getElementsByTagNameNS($this->formats['mets']['namespace'], 'mets');
if ($root->item(0) instanceof DOMNode) {
// Import node into DOMDocument.
if ($root->item(0) instanceof \DOMNode) {
// Import node into \DOMDocument.
$mets = $this->oai->importNode($root->item(0), TRUE);
} else {
$this->devLog('[tx_dlf_oai->getMetsData([data])] No METS part found in document with location "'.$metadata['location'].'"', SYSLOG_SEVERITY_ERROR, $metadata);
@ -363,7 +363,7 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
$this->deleteExpiredTokens();
// Create XML document.
$this->oai = new DOMDocument('1.0', 'UTF-8');
$this->oai = new \DOMDocument('1.0', 'UTF-8');
// Add processing instruction (aka XSL stylesheet).
if (!empty($this->conf['stylesheet'])) {
@ -594,7 +594,7 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
*
* @access protected
*
* @return DOMElement XML node to add to the OAI response
* @return \DOMElement XML node to add to the OAI response
*/
protected function verbIdentify() {
@ -697,7 +697,7 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
try {
$documentSet = $this->fetchDocumentUIDs();
} catch (Exception $exception) {
} catch (\Exception $exception) {
return $this->error($exception->getMessage());
}
@ -719,7 +719,7 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
*
* @access protected
*
* @return DOMElement XML node to add to the OAI response
* @return \DOMElement XML node to add to the OAI response
*/
protected function verbListMetadataFormats() {
@ -806,7 +806,7 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
try {
$documentSet = $this->fetchDocumentUIDs();
} catch (Exception $exception) {
} catch (\Exception $exception) {
return $this->error($exception->getMessage());
}
@ -878,7 +878,7 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
/**
* @return array
* @throws Exception
* @throws \Exception
*/
private function fetchDocumentUIDs() {
$solr_query = '';
@ -903,7 +903,7 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
);
if (!$GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
throw new Exception('noSetHierarchy');
throw new \Exception('noSetHierarchy');
}
$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
@ -942,7 +942,7 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
$from = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.000Z';
} else {
throw new Exception('badArgument');
throw new \Exception('badArgument');
}
}
@ -960,18 +960,18 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
$until = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.999Z';
if ($from != "*" && $from > $until) {
throw new Exception('badArgument');
throw new \Exception('badArgument');
}
} else {
throw new Exception('badArgument');
throw new \Exception('badArgument');
}
}
// Check "from" and "until" for same granularity.
if (!empty($this->piVars['from']) && !empty($this->piVars['until'])) {
if (strlen($this->piVars['from']) != strlen($this->piVars['until'])) {
throw new Exception('badArgument');
throw new \Exception('badArgument');
}
}
@ -996,7 +996,7 @@ class tx_dlf_oai extends \Kitodo\Dlf\Common\AbstractPlugin {
$result = $solr->search_raw($solr_query, $parameters);
if (empty($result)) {
throw new Exception('noRecordsMatch');
throw new \Exception('noRecordsMatch');
}
foreach ($result as $doc) {

View File

@ -51,7 +51,7 @@
<type>select</type>
<renderType>selectSingle</renderType>
<items type="array"></items>
<itemsProcFunc>tx_dlf_tceforms->itemsProcFunc_libraryList</itemsProcFunc>
<itemsProcFunc>Kitodo\\Dlf\\Hooks\\FormEngine->itemsProcFunc_libraryList</itemsProcFunc>
<size>1</size>
<maxitems>1</maxitems>
<minitems>0</minitems>
@ -98,7 +98,7 @@
<config>
<type>select</type>
<items type="array"></items>
<itemsProcFunc>tx_dlf_tceforms->itemsProcFunc_solrList</itemsProcFunc>
<itemsProcFunc>Kitodo\\Dlf\\Hooks\\FormEngine->itemsProcFunc_solrList</itemsProcFunc>
<size>1</size>
<maxitems>1</maxitems>
<minitems>0</minitems>

View File

@ -40,7 +40,7 @@ class tx_dlf_geturl_eid extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
*/
public function main($content = '', $conf = array ()) {
$this->cObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
$this->cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
$this->extKey = 'dlf';

View File

@ -71,7 +71,7 @@
<config>
<type>select</type>
<items type="array"></items>
<itemsProcFunc>tx_dlf_tceforms->itemsProcFunc_solrList</itemsProcFunc>
<itemsProcFunc>Kitodo\\Dlf\\Hooks\\FormEngine->itemsProcFunc_solrList</itemsProcFunc>
<size>1</size>
<maxitems>1</maxitems>
<minitems>0</minitems>
@ -102,7 +102,7 @@
<config>
<type>select</type>
<items type="array"></items>
<itemsProcFunc>tx_dlf_tceforms->itemsProcFunc_extendedSearchList</itemsProcFunc>
<itemsProcFunc>Kitodo\\Dlf\\Hooks\\FormEngine->itemsProcFunc_extendedSearchList</itemsProcFunc>
<size>5</size>
<autoSizeMax>15</autoSizeMax>
<maxitems>10</maxitems>
@ -148,7 +148,7 @@
<config>
<type>select</type>
<items type="array"/>
<itemsProcFunc>tx_dlf_tceforms->itemsProcFunc_collectionList</itemsProcFunc>
<itemsProcFunc>Kitodo\\Dlf\\Hooks\\FormEngine->itemsProcFunc_collectionList</itemsProcFunc>
<size>5</size>
<autoSizeMax>15</autoSizeMax>
<maxitems>1024</maxitems>
@ -164,7 +164,7 @@
<config>
<type>select</type>
<items type="array"></items>
<itemsProcFunc>tx_dlf_tceforms->itemsProcFunc_facetsList</itemsProcFunc>
<itemsProcFunc>Kitodo\\Dlf\\Hooks\\FormEngine->itemsProcFunc_facetsList</itemsProcFunc>
<size>5</size>
<autoSizeMax>15</autoSizeMax>
<maxitems>1024</maxitems>

View File

@ -49,7 +49,7 @@
<config>
<type>select</type>
<items type="array"></items>
<itemsProcFunc>tx_dlf_tceforms->itemsProcFunc_collectionList</itemsProcFunc>
<itemsProcFunc>Kitodo\\Dlf\\Hooks\\FormEngine->itemsProcFunc_collectionList</itemsProcFunc>
<size>5</size>
<autoSizeMax>15</autoSizeMax>
<maxitems>1024</maxitems>

View File

@ -69,7 +69,7 @@ class tx_dlf_toolbox extends \Kitodo\Dlf\Common\AbstractPlugin {
$tool = trim($tool);
$cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
$cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
$cObj->data = $data;

View File

@ -47,7 +47,7 @@
<config>
<type>select</type>
<items type="array"></items>
<itemsProcFunc>tx_dlf_tceforms->itemsProcFunc_toolList</itemsProcFunc>
<itemsProcFunc>Kitodo\\Dlf\\Hooks\\FormEngine->itemsProcFunc_toolList</itemsProcFunc>
<size>5</size>
<autoSizeMax>15</autoSizeMax>
<maxitems>1024</maxitems>