diff --git a/Classes/Cli/CommandLineIndexer.php b/Classes/Cli/CommandLineIndexer.php index 360518c4..45b9a6fe 100644 --- a/Classes/Cli/CommandLineIndexer.php +++ b/Classes/Cli/CommandLineIndexer.php @@ -47,11 +47,11 @@ class CommandLineIndexer extends \TYPO3\CMS\Core\Controller\CommandLineControlle case 'index': // Add command line arguments. - $this->cli_options[] = array ('-doc UID/URL', 'UID or (properly encoded) URL of the document.'); + $this->cli_options[] = ['-doc UID/URL', 'UID or (properly encoded) URL of the document.']; - $this->cli_options[] = array ('-pid UID', 'UID of the page the document should be added to.'); + $this->cli_options[] = ['-pid UID', 'UID of the page the document should be added to.']; - $this->cli_options[] = array ('-core UID', 'UID of the Solr core the document should be added to.'); + $this->cli_options[] = ['-core UID', 'UID of the Solr core the document should be added to.']; // Check the command line arguments. $this->cli_validateArgs(); @@ -115,11 +115,11 @@ class CommandLineIndexer extends \TYPO3\CMS\Core\Controller\CommandLineControlle case 'reindex': // Add command line arguments. - $this->cli_options[] = array ('-coll UID', 'UID of the collection.'); + $this->cli_options[] = ['-coll UID', 'UID of the collection.']; - $this->cli_options[] = array ('-pid UID', 'UID of the page the document should be added to.'); + $this->cli_options[] = ['-pid UID', 'UID of the page the document should be added to.']; - $this->cli_options[] = array ('-core UID', 'UID of the Solr core the document should be added to.'); + $this->cli_options[] = ['-core UID', 'UID of the Solr core the document should be added to.']; // Check the command line arguments. $this->cli_validateArgs(); @@ -215,14 +215,14 @@ class CommandLineIndexer extends \TYPO3\CMS\Core\Controller\CommandLineControlle parent::__construct(); // Set basic information about the script. - $this->cli_help = array ( + $this->cli_help = [ 'name' => 'Command Line Interface for Kitodo.Presentation', 'synopsis' => '###OPTIONS###', 'description' => 'Currently the only tasks available are "index" and "reindex".'.LF.'Try "/PATH/TO/TYPO3/cli_dispatch.phpsh dlf TASK" for more options.', 'examples' => '/PATH/TO/TYPO3/cli_dispatch.phpsh dlf TASK -ARG1=VALUE1 -ARG2=VALUE2', 'options' => '', 'author' => 'Kitodo. Key to digital objects e.V. ', - ); + ]; } diff --git a/Classes/Common/AbstractPlugin.php b/Classes/Common/AbstractPlugin.php index 086d2e02..16c278ba 100644 --- a/Classes/Common/AbstractPlugin.php +++ b/Classes/Common/AbstractPlugin.php @@ -81,7 +81,7 @@ abstract class AbstractPlugin extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin protected function init(array $conf) { // Read FlexForm configuration. - $flexFormConf = array (); + $flexFormConf = []; $this->cObj->readFlexformIntoConf($this->cObj->data['pi_flexform'], $flexFormConf); diff --git a/Classes/Common/Document.php b/Classes/Common/Document.php index 988f804f..c14c82cc 100644 --- a/Classes/Common/Document.php +++ b/Classes/Common/Document.php @@ -45,7 +45,7 @@ final class Document { * @var array * @access protected */ - protected $dmdSec = array (); + protected $dmdSec = []; /** * Are the METS file's dmdSecs loaded? @@ -71,7 +71,7 @@ final class Document { * @var array * @access protected */ - protected $fileGrps = array (); + protected $fileGrps = []; /** * Are the file groups loaded? @@ -89,20 +89,20 @@ final class Document { * @var array * @access protected */ - protected $formats = array ( - 'OAI' => array ( + protected $formats = [ + 'OAI' => [ 'rootElement' => 'OAI-PMH', 'namespaceURI' => 'http://www.openarchives.org/OAI/2.0/', - ), - 'METS' => array ( + ], + 'METS' => [ 'rootElement' => 'mets', 'namespaceURI' => 'http://www.loc.gov/METS/', - ), - 'XLINK' => array ( + ], + 'XLINK' => [ 'rootElement' => 'xlink', 'namespaceURI' => 'http://www.w3.org/1999/xlink', - ) - ); + ] + ]; /** * Are the available metadata formats loaded? @@ -127,7 +127,7 @@ final class Document { * @var array * @access protected */ - protected $lastSearchedPhysicalPage = array ('logicalPage' => NULL, 'physicalPage' => NULL); + protected $lastSearchedPhysicalPage = ['logicalPage' => NULL, 'physicalPage' => NULL]; /** * This holds the documents location @@ -143,7 +143,7 @@ final class Document { * @var array * @access protected */ - protected $logicalUnits = array (); + protected $logicalUnits = []; /** * This holds the documents' parsed metadata array with their corresponding structMap//div's ID as array key @@ -151,7 +151,7 @@ final class Document { * @var array * @access protected */ - protected $metadataArray = array (); + protected $metadataArray = []; /** * Is the metadata array loaded? @@ -192,7 +192,7 @@ final class Document { * @var array * @access protected */ - protected $physicalStructure = array (); + protected $physicalStructure = []; /** * This holds the physical structure metadata @@ -200,7 +200,7 @@ final class Document { * @var array * @access protected */ - protected $physicalStructureInfo = array (); + protected $physicalStructureInfo = []; /** * Is the physical structure loaded? @@ -225,7 +225,7 @@ final class Document { * @var array * @access protected */ - protected $rawTextArray = array (); + protected $rawTextArray = []; /** * Is the document instantiated successfully? @@ -249,7 +249,7 @@ final class Document { * @var array (\Kitodo\Dlf\Common\Document) * @access protected */ - protected static $registry = array (); + protected static $registry = []; /** * This holds the UID of the root document or zero if not multi-volumed @@ -274,7 +274,7 @@ final class Document { * @var array * @access protected */ - protected $smLinks = array ('l2p' => array (), 'p2l' => array ()); + protected $smLinks = ['l2p' => [], 'p2l' => []]; /** * Are the smLinks loaded? @@ -291,7 +291,7 @@ final class Document { * @var array * @access protected */ - protected $tableOfContents = array (); + protected $tableOfContents = []; /** * Is the table of contents loaded? @@ -353,7 +353,7 @@ final class Document { public static function clearRegistry() { // Reset registry array. - self::$registry = array (); + self::$registry = []; } @@ -511,7 +511,7 @@ final class Document { */ public function getLogicalStructure($id, $recursive = FALSE) { - $details = array (); + $details = []; // Is the requested logical unit already loaded? if (!$recursive && !empty($this->logicalUnits[$id])) { @@ -578,7 +578,7 @@ final class Document { $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::$extKey]); // Extract identity information. - $details = array (); + $details = []; $details['id'] = $attributes['ID']; @@ -655,7 +655,7 @@ final class Document { } // Get the files this structure element is pointing at. - $details['files'] = array (); + $details['files'] = []; $fileUse = $this->_getFileGrps(); @@ -677,7 +677,7 @@ final class Document { // Walk the structure recursively? And are there any children of the current element? if ($recursive && count($structure->children('http://www.loc.gov/METS/')->div)) { - $details['children'] = array (); + $details['children'] = []; foreach ($structure->children('http://www.loc.gov/METS/')->div as $child) { @@ -725,7 +725,7 @@ final class Document { } - return array (); + return []; } @@ -737,24 +737,24 @@ final class Document { } // Initialize metadata array with empty values. - $metadata = array ( - 'title' => array (), - 'title_sorting' => array (), - 'author' => array (), - 'place' => array (), - 'year' => array (), - 'prod_id' => array (), - 'record_id' => array (), - 'opac_id' => array (), - 'union_id' => array (), - 'urn' => array (), - 'purl' => array (), - 'type' => array (), - 'volume' => array (), - 'volume_sorting' => array (), - 'collection' => array (), - 'owner' => array (), - ); + $metadata = [ + 'title' => [], + 'title_sorting' => [], + 'author' => [], + 'place' => [], + 'year' => [], + 'prod_id' => [], + 'record_id' => [], + 'opac_id' => [], + 'union_id' => [], + 'urn' => [], + 'purl' => [], + 'type' => [], + 'volume' => [], + 'volume_sorting' => [], + 'collection' => [], + 'owner' => [], + ]; // Get the logical structure node's DMDID. if (!empty($this->logicalUnits[$id])) { @@ -808,20 +808,20 @@ final class Document { } - return array (); + return []; } // Get the structure's type. if (!empty($this->logicalUnits[$id])) { - $metadata['type'] = array ($this->logicalUnits[$id]['type']); + $metadata['type'] = [$this->logicalUnits[$id]['type']]; } else { $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]/@TYPE'); - $metadata['type'] = array ((string) $struct[0]); + $metadata['type'] = [(string) $struct[0]]; } @@ -850,7 +850,7 @@ final class Document { if ($values instanceof \DOMNodeList && $values->length > 0) { - $metadata[$resArray['index_name']] = array (); + $metadata[$resArray['index_name']] = []; foreach ($values as $value) { @@ -860,7 +860,7 @@ final class Document { } elseif (!($values instanceof \DOMNodeList)) { - $metadata[$resArray['index_name']] = array (trim((string) $values)); + $metadata[$resArray['index_name']] = [trim((string) $values)]; } @@ -872,7 +872,7 @@ final class Document { // These empty fields are then shown within the search facets as 'empty'. if (empty($metadata[$resArray['index_name']][0]) && strlen($resArray['default_value']) > 0) { - $metadata[$resArray['index_name']] = array ($resArray['default_value']); + $metadata[$resArray['index_name']] = [$resArray['default_value']]; } @@ -941,7 +941,7 @@ final class Document { } else { // There is no dmdSec for this structure node. - return array (); + return []; } @@ -1322,11 +1322,11 @@ final class Document { while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { // Update format registry. - $this->formats[$resArray['type']] = array ( + $this->formats[$resArray['type']] = [ 'rootElement' => $resArray['root'], 'namespaceURI' => $resArray['namespace'], 'class' => $resArray['class'] - ); + ]; } @@ -1512,7 +1512,7 @@ final class Document { $metadata['type'][0] = $structure; // Get UIDs for collections. - $collections = array (); + $collections = []; $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'tx_dlf_collections.index_name AS index_name,tx_dlf_collections.uid AS uid', @@ -1541,7 +1541,7 @@ final class Document { // Insert new collection. $collNewUid = uniqid('NEW'); - $collData['tx_dlf_collections'][$collNewUid] = array ( + $collData['tx_dlf_collections'][$collNewUid] = [ 'pid' => $pid, 'label' => $collection, 'index_name' => $collection, @@ -1550,7 +1550,7 @@ final class Document { 'documents' => 0, 'owner' => 0, 'status' => 0, - ); + ]; $substUid = Helper::processDB($collData); @@ -1601,7 +1601,7 @@ final class Document { // Insert new library. $libNewUid = uniqid('NEW'); - $libData['tx_dlf_libraries'][$libNewUid] = array ( + $libData['tx_dlf_libraries'][$libNewUid] = [ 'pid' => $pid, 'label' => $owner, 'index_name' => $owner, @@ -1614,7 +1614,7 @@ final class Document { 'opac_base' => '', 'union_label' => '', 'union_base' => '', - ); + ]; $substUid = Helper::processDB($libData); @@ -1705,9 +1705,9 @@ final class Document { } // Get metadata for lists and sorting. - $listed = array (); + $listed = []; - $sortable = array (); + $sortable = []; $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.is_listed AS is_listed,tx_dlf_metadata.is_sortable AS is_sortable', @@ -1739,7 +1739,7 @@ final class Document { } // Fill data array. - $data['tx_dlf_documents'][$this->uid] = array ( + $data['tx_dlf_documents'][$this->uid] = [ 'pid' => $pid, $GLOBALS['TCA']['tx_dlf_documents']['ctrl']['enablecolumns']['starttime'] => 0, $GLOBALS['TCA']['tx_dlf_documents']['ctrl']['enablecolumns']['endtime'] => 0, @@ -1766,7 +1766,7 @@ final class Document { 'owner' => $metadata['owner'][0], 'solrcore' => $core, 'status' => 0, - ); + ]; // Unhide hidden documents. if (!empty($conf['unhideOnIndex'])) { @@ -2022,7 +2022,7 @@ final class Document { } - return array (); + return []; } @@ -2746,7 +2746,7 @@ final class Document { // \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'); + return ['uid', 'pid', 'recordId', 'parentId', 'asXML']; } diff --git a/Classes/Common/DocumentList.php b/Classes/Common/DocumentList.php index 91cebb7a..616fbd7e 100644 --- a/Classes/Common/DocumentList.php +++ b/Classes/Common/DocumentList.php @@ -38,7 +38,7 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co * @var array * @access protected */ - protected $elements = array (); + protected $elements = []; /** * This holds the list's metadata @@ -46,7 +46,7 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co * @var array * @access protected */ - protected $metadata = array (); + protected $metadata = []; /** * This holds the current list position @@ -63,7 +63,7 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co * @var array * @access protected */ - protected $records = array (); + protected $records = []; /** * Instance of \Kitodo\Dlf\Common\Solr class @@ -79,7 +79,7 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co * @var array * @access protected */ - protected $solrConfig = array (); + protected $solrConfig = []; /** * This adds an array of elements at the given position to the list @@ -158,7 +158,7 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co */ protected function getRecord($element) { - if (is_array($element) && array_keys($element) == array ('u', 'h', 's', 'p')) { + if (is_array($element) && array_keys($element) == ['u', 'h', 's', 'p']) { // Return already processed record if possible. if (!empty($this->records[$element['u']])) { @@ -167,12 +167,12 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co } - $record = array ( + $record = [ 'uid' => $element['u'], 'page' => 1, 'preview' => '', 'subparts' => $element['p'] - ); + ]; // Check if it's a list of database records or Solr documents. if (!empty($this->metadata['options']['source']) && $this->metadata['options']['source'] == 'collection') { @@ -226,15 +226,15 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co $record['metadata'] = $metadata; - } elseif (($key = array_search(array ('u' => $resArray['uid']), $record['subparts'], TRUE)) !== FALSE) { + } elseif (($key = array_search(['u' => $resArray['uid']], $record['subparts'], TRUE)) !== FALSE) { - $record['subparts'][$key] = array ( + $record['subparts'][$key] = [ 'uid' => $resArray['uid'], 'page' => 1, 'preview' => (!empty($record['subparts'][$key]['h']) ? $record['subparts'][$key]['h'] : ''), 'thumbnail' => $resArray['thumbnail'], 'metadata' => $metadata - ); + ]; } @@ -244,7 +244,7 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co if ($this->solrConnect()) { - $params = array (); + $params = []; // Restrict the fields to the required ones $params['fields'] = 'uid,id,toplevel,thumbnail,page'; @@ -258,13 +258,13 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co // If it is a fulltext search, enable highlighting. if ($this->metadata['fulltextSearch']) { - $params['component'] = array ( - 'highlighting' => array ( + $params['component'] = [ + 'highlighting' => [ 'query' => Solr::escapeQuery($this->metadata['searchString']), 'field' => 'fulltext', 'usefastvectorhighlighter' => TRUE - ) - ); + ] + ]; } @@ -276,7 +276,7 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co $params['rows'] = 10000; // Take over existing filter queries. - $params['filterquery'] = isset($this->metadata['options']['params']['filterquery']) ? $this->metadata['options']['params']['filterquery'] : array (); + $params['filterquery'] = isset($this->metadata['options']['params']['filterquery']) ? $this->metadata['options']['params']['filterquery'] : []; // Extend filter query to get all documents with the same uid. foreach ($params['filterquery'] as $key => $value) { @@ -290,7 +290,7 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co } // Add filter query to get all documents with the required uid. - $params['filterquery'][] = array ('query' => 'uid:'.Solr::escapeQuery($record['uid'])); + $params['filterquery'][] = ['query' => 'uid:'.Solr::escapeQuery($record['uid'])]; // Add sorting $params['sort'] = $this->metadata['options']['params']['sort']; @@ -313,13 +313,13 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co foreach ($result as $resArray) { // Prepare document's metadata. - $metadata = array (); + $metadata = []; foreach ($this->solrConfig as $index_name => $solr_name) { if (!empty($resArray->$solr_name)) { - $metadata[$index_name] = (is_array($resArray->$solr_name) ? $resArray->$solr_name : array ($resArray->$solr_name)); + $metadata[$index_name] = (is_array($resArray->$solr_name) ? $resArray->$solr_name : [$resArray->$solr_name]); } @@ -337,13 +337,13 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co $highlightedDoc = !empty($highlighting) ? $highlighting->getResult($resArray->id) : NULL; $highlight = !empty($highlightedDoc) ? $highlightedDoc->getField('fulltext')[0] : ''; - $record['subparts'][$resArray->id] = array ( + $record['subparts'][$resArray->id] = [ 'uid' => $resArray->uid, 'page' => $resArray->page, 'preview' => $highlight, 'thumbnail' => $resArray->thumbnail, 'metadata' => $metadata - ); + ]; } @@ -437,7 +437,7 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co $element = $this->remove($position); - $this->add(array ($element), $position + $steps); + $this->add([$element], $position + $steps); } @@ -641,11 +641,11 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co */ public function reset() { - $this->elements = array (); + $this->elements = []; - $this->records = array (); + $this->records = []; - $this->metadata = array (); + $this->metadata = []; $this->count = 0; @@ -687,7 +687,7 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co } else { - Helper::saveToSession(array ($this->elements, $this->metadata), get_class($this)); + Helper::saveToSession([$this->elements, $this->metadata], get_class($this)); } @@ -751,9 +751,9 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co */ public function sort($by, $asc = TRUE) { - $newOrder = array (); + $newOrder = []; - $nonSortable = array (); + $nonSortable = []; foreach ($this->elements as $num => $element) { @@ -858,7 +858,7 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co * * @return void */ - protected function _setMetadata(array $metadata = array ()) { + protected function _setMetadata(array $metadata = []) { $this->metadata = $metadata; @@ -874,7 +874,7 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co * * @return void */ - public function __construct(array $elements = array (), array $metadata = array ()) { + public function __construct(array $elements = [], array $metadata = []) { if (empty($elements) && empty($metadata)) { @@ -993,7 +993,7 @@ class DocumentList implements \ArrayAccess, \Countable, \Iterator, \TYPO3\CMS\Co */ public function __sleep() { - return array ('elements', 'metadata'); + return ['elements', 'metadata']; } diff --git a/Classes/Common/DocumentTypeCheck.php b/Classes/Common/DocumentTypeCheck.php index 64f3940b..0e574990 100644 --- a/Classes/Common/DocumentTypeCheck.php +++ b/Classes/Common/DocumentTypeCheck.php @@ -45,7 +45,7 @@ class DocumentTypeCheck { * @var array * @access protected */ - protected $piVars = array (); + protected $piVars = []; /** * This holds the DLF parameter prefix diff --git a/Classes/Common/Helper.php b/Classes/Common/Helper.php index 34e166fd..b8a998e8 100644 --- a/Classes/Common/Helper.php +++ b/Classes/Common/Helper.php @@ -36,7 +36,7 @@ class Helper { * @var array * @access protected */ - protected static $messages = array (); + protected static $messages = []; /** * Adds a message to the message queue. @@ -321,7 +321,7 @@ class Helper { $hash = $salt.substr(sha1($salt.$string), -10); - return array ('encrypted' => $encrypted, 'hash' => $hash); + return ['encrypted' => $encrypted, 'hash' => $hash]; } @@ -437,7 +437,7 @@ class Helper { */ public static function getHookObjects($scriptRelPath) { - $hookObjects = array (); + $hookObjects = []; if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey.'/'.$scriptRelPath]['hookClass'])) { @@ -474,7 +474,7 @@ class Helper { // Sanitize input. $uid = max(intval($uid), 0); - if (!$uid || !in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { + if (!$uid || !in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'])) { if (TYPO3_DLOG) { @@ -545,7 +545,7 @@ class Helper { $_pid = $pid; - if (!$index_name || !in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { + if (!$index_name || !in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'])) { if (TYPO3_DLOG) { @@ -756,7 +756,7 @@ class Helper { */ public static function getURN($base, $id) { - $concordance = array ( + $concordance = [ '0' => 1, '1' => 2, '2' => 3, @@ -795,7 +795,7 @@ class Helper { 'z' => 38, '-' => 39, ':' => 17, - ); + ]; $urn = strtolower($base.$id); @@ -912,7 +912,7 @@ class Helper { * * @return array Array of substituted "NEW..." identifiers and their actual UIDs. */ - public static function processDB(array $data = array (), array $cmd = array (), $reverseOrder = FALSE, $be_user = FALSE) { + public static function processDB(array $data = [], array $cmd = [], $reverseOrder = FALSE, $be_user = FALSE) { // Instantiate TYPO3 core engine. $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class); @@ -970,7 +970,7 @@ class Helper { * * @return array Array of substituted "NEW..." identifiers and their actual UIDs. */ - public static function processDBasAdmin(array $data = array (), array $cmd = array (), $reverseOrder = FALSE) { + public static function processDBasAdmin(array $data = [], array $cmd = [], $reverseOrder = FALSE) { if (TYPO3_MODE === 'BE' && $GLOBALS['BE_USER']->isAdmin()) { @@ -980,11 +980,11 @@ class Helper { if (TYPO3_DLOG) { - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[\Kitodo\Dlf\Common\Helper->processDBasAdmin([data->data], [data->cmd], ['.($reverseOrder ? 'TRUE' : 'FALSE').'])] Current backend user has no admin privileges', self::$extKey, SYSLOG_SEVERITY_ERROR, array ('data' => $data, 'cmd' => $cmd)); + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[\Kitodo\Dlf\Common\Helper->processDBasAdmin([data->data], [data->cmd], ['.($reverseOrder ? 'TRUE' : 'FALSE').'])] Current backend user has no admin privileges', self::$extKey, SYSLOG_SEVERITY_ERROR, ['data' => $data, 'cmd' => $cmd]); } - return array (); + return []; } @@ -1123,7 +1123,7 @@ class Helper { $_pid = $pid; // Load labels into static variable for future use. - static $labels = array (); + static $labels = []; // Sanitize input. $pid = max(intval($pid), 0); @@ -1190,7 +1190,7 @@ class Helper { if (empty($labels[$table][$pid][$GLOBALS['TSFE']->sys_language_content][$index_name])) { // Check if this table is allowed for translation. - if (in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'))) { + if (in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'])) { $additionalWhere = ' AND sys_language_uid IN (-1,0)'; diff --git a/Classes/Common/Indexer.php b/Classes/Common/Indexer.php index db78a9ac..c2751689 100644 --- a/Classes/Common/Indexer.php +++ b/Classes/Common/Indexer.php @@ -36,15 +36,15 @@ class Indexer { * @var array * @access protected */ - protected static $fields = array ( - 'autocomplete' => array (), - 'facets' => array (), - 'sortables' => array (), - 'indexed' => array (), - 'stored' => array (), - 'tokenized' => array (), - 'fieldboost' => array () - ); + protected static $fields = [ + 'autocomplete' => [], + 'facets' => [], + 'sortables' => [], + 'indexed' => [], + 'stored' => [], + 'tokenized' => [], + 'fieldboost' => [] + ]; /** * Is the index configuration loaded? @@ -61,7 +61,7 @@ class Indexer { * @var array * @access protected */ - protected static $processedDocs = array (); + protected static $processedDocs = []; /** * Instance of \Kitodo\Dlf\Common\Solr class @@ -579,7 +579,7 @@ class Indexer { $solrDoc->setField('collection', $doc->metadataArray[$doc->toplevelId]['collection']); - $autocomplete = array (); + $autocomplete = []; foreach ($metadata as $index_name => $data) { diff --git a/Classes/Common/Solr.php b/Classes/Common/Solr.php index 148a6ba7..980a4bda 100644 --- a/Classes/Common/Solr.php +++ b/Classes/Common/Solr.php @@ -68,7 +68,7 @@ class Solr { * @var array * @access protected */ - protected $params = array (); + protected $params = []; /** * Is the search instantiated successfully? @@ -84,7 +84,7 @@ class Solr { * @var array (\Kitodo\Dlf\Common\Solr) * @access protected */ - protected static $registry = array (); + protected static $registry = []; /** * This holds the Solr service object @@ -136,7 +136,7 @@ class Solr { if (preg_match('/^[[:alnum:]]+_[tu][su]i:\(?.*\)?$/', $query)) { // Get all indexed fields. - $fields = array (); + $fields = []; $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'tx_dlf_metadata.index_name,tx_dlf_metadata.index_tokenized,tx_dlf_metadata.index_stored', @@ -257,7 +257,7 @@ class Solr { */ public static function getSolrConnectionInfo() { - $solrInfo = array (); + $solrInfo = []; // Extract extension configuration. $conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::$extKey]); @@ -349,12 +349,12 @@ class Solr { */ public function search() { - $toplevel = array (); + $toplevel = []; // Take over query parameters. $params = $this->params; - $params['filterquery'] = isset($params['filterquery']) ? $params['filterquery'] : array (); + $params['filterquery'] = isset($params['filterquery']) ? $params['filterquery'] : []; // Set some query parameters. $params['start'] = 0; @@ -369,7 +369,7 @@ class Solr { // Restore query parameters $params = $this->params; - $params['filterquery'] = isset($params['filterquery']) ? $params['filterquery'] : array (); + $params['filterquery'] = isset($params['filterquery']) ? $params['filterquery'] : []; // Restrict the fields to the required ones. $params['fields'] = 'uid,id'; @@ -386,7 +386,7 @@ class Solr { } // Set filter query to just get toplevel documents. - $params['filterquery'][] = array ('query' => 'toplevel:true'); + $params['filterquery'][] = ['query' => 'toplevel:true']; // Set join query to get all documents with the same uids. $params['query'] = '{!join from=uid to=uid}'.$params['query']; @@ -400,12 +400,12 @@ class Solr { // Process results. foreach ($results as $doc) { - $toplevel[$doc->id] = array ( + $toplevel[$doc->id] = [ 'u' => $doc->uid, 'h' => '', 's' => '', - 'p' => array () - ); + 'p' => [] + ]; } @@ -417,10 +417,10 @@ class Solr { $list->add(array_values($toplevel)); // Set metadata for search. - $list->metadata = array ( + $list->metadata = [ 'label' => '', 'description' => '', - 'options' => array ( + 'options' => [ 'source' => 'search', 'engine' => 'solr', 'select' => $this->params['query'], @@ -432,8 +432,8 @@ class Solr { 'order.asc' => TRUE, 'numberOfHits' => $this->numberOfHits, 'numberOfToplevelHits' => $numberOfToplevelHits - ) - ); + ] + ]; return $list; @@ -449,7 +449,7 @@ class Solr { * * @return array The Apache Solr Documents that were fetched */ - public function search_raw($query = '', $parameters = array ()) { + public function search_raw($query = '', $parameters = []) { // Set additional query parameters. $parameters['start'] = 0; @@ -462,7 +462,7 @@ class Solr { $selectQuery = $this->service->createSelect(array_merge($this->params, $parameters)); $result = $this->service->select($selectQuery); - $resultSet = array (); + $resultSet = []; foreach ($result as $doc) { @@ -645,9 +645,9 @@ class Solr { $solrInfo = self::getSolrConnectionInfo(); - $config = array ( - 'endpoint' => array ( - 'dlf' => array ( + $config = [ + 'endpoint' => [ + 'dlf' => [ 'scheme' => $solrInfo['scheme'], 'host' => $solrInfo['host'], 'port' => $solrInfo['port'], @@ -656,9 +656,9 @@ class Solr { 'username' => $solrInfo['username'], 'password' => $solrInfo['password'], 'timeout' => $solrInfo['timeout'] - ) - ) - ); + ] + ] + ]; // Instantiate Solarium\Client class. $this->service = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Solarium\Client::class, $config); diff --git a/Classes/Formats/Mods.php b/Classes/Formats/Mods.php index 86da92f0..e89edbc2 100644 --- a/Classes/Formats/Mods.php +++ b/Classes/Formats/Mods.php @@ -59,7 +59,7 @@ class Mods implements \Kitodo\Dlf\Common\MetadataInterface { } elseif (($nameParts = $authors[$i]->xpath('./mods:namePart'))) { - $name = array (); + $name = []; $k = 4; diff --git a/Classes/Hooks/ConfigurationForm.php b/Classes/Hooks/ConfigurationForm.php index 4f506bd1..b0f7d477 100644 --- a/Classes/Hooks/ConfigurationForm.php +++ b/Classes/Hooks/ConfigurationForm.php @@ -30,7 +30,7 @@ class ConfigurationForm { * @var array * @access protected */ - protected $conf = array (); + protected $conf = []; /** * This holds the output ready to return @@ -68,12 +68,12 @@ class ConfigurationForm { // Build request URI. $url = $solrInfo['scheme'].'://'.$host.':'.$solrInfo['port'].'/'.$solrInfo['path'].'/admin/cores?wt=xml'; - $context = stream_context_create(array ( - 'http' => array ( + $context = stream_context_create([ + 'http' => [ 'method' => 'GET', 'user_agent' => (!empty($this->conf['useragent']) ? $this->conf['useragent'] : ini_get('user_agent')) - ) - )); + ] + ]); // Try to connect to Solr server. $response = @simplexml_load_string(file_get_contents($url, FALSE, $context)); @@ -152,7 +152,7 @@ class ConfigurationForm { ); // Check if user is configured properly. - if (count(array_diff(array ($groupUid), $resArray['usergroup'])) == 0 + if (count(array_diff([$groupUid], $resArray['usergroup'])) == 0 && !$resArray['admin'] && $GLOBALS['TYPO3_DB']->sql_num_rows($result2) > 0) { @@ -171,17 +171,17 @@ class ConfigurationForm { if (!$checkOnly && $groupUid) { // Keep exisiting values and add the new ones. - $usergroup = array_unique(array_merge(array ($groupUid), $resArray['usergroup'])); + $usergroup = array_unique(array_merge([$groupUid], $resArray['usergroup'])); // Try to configure user. - $data = array (); - $data['be_users'][$resArray['uid']] = array ( + $data = []; + $data['be_users'][$resArray['uid']] = [ 'admin' => 0, 'usergroup' => implode(',', $usergroup), $GLOBALS['TCA']['be_users']['ctrl']['enablecolumns']['disabled'] => 0, $GLOBALS['TCA']['be_users']['ctrl']['enablecolumns']['starttime'] => 0, $GLOBALS['TCA']['be_users']['ctrl']['enablecolumns']['endtime'] => 0 - ); + ]; Helper::processDBasAdmin($data); @@ -231,14 +231,14 @@ class ConfigurationForm { // Try to create user. $tempUid = uniqid('NEW'); - $data = array (); - $data['be_users'][$tempUid] = array ( + $data = []; + $data['be_users'][$tempUid] = [ 'pid' => 0, 'username' => '_cli_dlf', 'password' => md5($tempUid), 'realName' => $GLOBALS['LANG']->getLL('cliUserGroup.usrRealName'), 'usergroup' => intval($groupUid) - ); + ]; $substUid = Helper::processDBasAdmin($data); @@ -297,7 +297,7 @@ class ConfigurationForm { * * @return integer UID of usergroup or 0 if something is wrong */ - protected function checkCliGroup($checkOnly, $settings = array ()) { + protected function checkCliGroup($checkOnly, $settings = []) { // Set default return value. $grpUid = 0; @@ -305,9 +305,9 @@ class ConfigurationForm { // Set default configuration for usergroup. if (empty($settings)) { - $settings = array ( - 'non_exclude_fields' => array (), - 'tables_select' => array ( + $settings = [ + 'non_exclude_fields' => [], + 'tables_select' => [ 'tx_dlf_documents', 'tx_dlf_collections', 'tx_dlf_libraries', @@ -316,13 +316,13 @@ class ConfigurationForm { 'tx_dlf_metadataformat', 'tx_dlf_formats', 'tx_dlf_solrcores' - ), - 'tables_modify' => array ( + ], + 'tables_modify' => [ 'tx_dlf_documents', 'tx_dlf_collections', 'tx_dlf_libraries' - ) - ); + ] + ]; // Set allowed exclude fields. foreach ($settings['tables_modify'] as $table) { @@ -389,13 +389,13 @@ class ConfigurationForm { $tables_modify = array_unique(array_merge($settings['tables_modify'], $resArray['tables_modify'])); // Try to configure usergroup. - $data = array (); - $data['be_groups'][$resArray['uid']] = array ( + $data = []; + $data['be_groups'][$resArray['uid']] = [ 'non_exclude_fields' => implode(',', $non_exclude_fields), 'tables_select' => implode(',', $tables_select), 'tables_modify' => implode(',', $tables_modify), $GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled'] => 0 - ); + ]; Helper::processDBasAdmin($data); @@ -445,15 +445,15 @@ class ConfigurationForm { // Try to create usergroup. $tempUid = uniqid('NEW'); - $data = array (); - $data['be_groups'][$tempUid] = array ( + $data = []; + $data['be_groups'][$tempUid] = [ 'pid' => 0, 'title' => '_cli_dlf', 'description' => $GLOBALS['LANG']->getLL('cliUserGroup.grpDescription'), 'non_exclude_fields' => implode(',', $settings['non_exclude_fields']), 'tables_select' => implode(',', $settings['tables_select']), 'tables_modify' => implode(',', $settings['tables_modify']) - ); + ]; $substUid = Helper::processDBasAdmin($data); @@ -567,11 +567,11 @@ class ConfigurationForm { */ public function checkMetadataFormats(&$params, &$pObj) { - $nsDefined = array ( + $nsDefined = [ 'MODS' => FALSE, 'TEIHDR' => FALSE, 'ALTO' => FALSE - ); + ]; // Check existing format specifications. $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( @@ -587,44 +587,44 @@ class ConfigurationForm { } // Build data array. - $data = array (); + $data = []; // Add MODS namespace. if (!$nsDefined['MODS']) { - $data['tx_dlf_formats'][uniqid('NEW')] = array ( + $data['tx_dlf_formats'][uniqid('NEW')] = [ 'pid' => 0, 'type' => 'MODS', 'root' => 'mods', 'namespace' => 'http://www.loc.gov/mods/v3', 'class' => 'Kitodo\\Dlf\\Formats\\Mods' - ); + ]; } // Add TEIHDR namespace. if (!$nsDefined['TEIHDR']) { - $data['tx_dlf_formats'][uniqid('NEW')] = array ( + $data['tx_dlf_formats'][uniqid('NEW')] = [ 'pid' => 0, 'type' => 'TEIHDR', 'root' => 'teiHeader', 'namespace' => 'http://www.tei-c.org/ns/1.0', 'class' => 'Kitodo\\Dlf\\Formats\\TeiHeader' - ); + ]; } // Add ALTO namespace. if (!$nsDefined['ALTO']) { - $data['tx_dlf_formats'][uniqid('NEW')] = array ( + $data['tx_dlf_formats'][uniqid('NEW')] = [ 'pid' => 0, 'type' => 'ALTO', 'root' => 'alto', 'namespace' => 'http://www.loc.gov/standards/alto/ns-v2#', 'class' => 'Kitodo\\Dlf\\Formats\\Alto' - ); + ]; } diff --git a/Classes/Hooks/DataHandler.php b/Classes/Hooks/DataHandler.php index e996e087..cef83290 100644 --- a/Classes/Hooks/DataHandler.php +++ b/Classes/Hooks/DataHandler.php @@ -133,12 +133,12 @@ class DataHandler { } - $context = stream_context_create(array ( - 'http' => array ( + $context = stream_context_create([ + 'http' => [ 'method' => 'GET', 'user_agent' => ($conf['useragent'] ? $conf['useragent'] : ini_get('user_agent')) - ) - )); + ] + ]); // Build request for adding new Solr core. // @see http://wiki.apache.org/solr/CoreAdmin @@ -168,7 +168,7 @@ class DataHandler { } // Solr core could not be created, thus unset field array. - $fieldArray = array (); + $fieldArray = []; break; @@ -246,7 +246,7 @@ class DataHandler { if (count($fieldArray) < 2) { // Unset the whole field array. - $fieldArray = array (); + $fieldArray = []; } else { @@ -385,7 +385,7 @@ class DataHandler { */ public function processCmdmap_postProcess($command, $table, $id, $value, $pObj) { - if (in_array($command, array ('move', 'delete', 'undelete')) && $table == 'tx_dlf_documents') { + if (in_array($command, ['move', 'delete', 'undelete']) && $table == 'tx_dlf_documents') { // Get Solr core. $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( diff --git a/Classes/Hooks/FormEngine.php b/Classes/Hooks/FormEngine.php index 75323b7d..9db2d22d 100644 --- a/Classes/Hooks/FormEngine.php +++ b/Classes/Hooks/FormEngine.php @@ -331,7 +331,7 @@ class FormEngine { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'] as $class => $label) { - $params['items'][] = array ($GLOBALS['LANG']->sL($label), $class); + $params['items'][] = [$GLOBALS['LANG']->sL($label), $class]; } diff --git a/Classes/Plugins/AudioPlayer.php b/Classes/Plugins/AudioPlayer.php index 088428af..c37e37f0 100644 --- a/Classes/Plugins/AudioPlayer.php +++ b/Classes/Plugins/AudioPlayer.php @@ -29,7 +29,7 @@ class AudioPlayer extends \Kitodo\Dlf\Common\AbstractPlugin { * @var array * @access protected */ - protected $audio = array (); + protected $audio = []; /** * Adds Player javascript @@ -40,7 +40,7 @@ class AudioPlayer extends \Kitodo\Dlf\Common\AbstractPlugin { */ protected function addPlayerJS() { - $output = array (); + $output = []; $output[] = ''; @@ -132,9 +132,9 @@ class AudioPlayer extends \Kitodo\Dlf\Common\AbstractPlugin { $this->getTemplate(); // Fill in the template markers. - $markerArray = array ( + $markerArray = [ '###PLAYER_JS###' => $this->addPlayerJS() - ); + ]; $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); diff --git a/Classes/Plugins/Basket.php b/Classes/Plugins/Basket.php index f76bd4b5..197432a4 100644 --- a/Classes/Plugins/Basket.php +++ b/Classes/Plugins/Basket.php @@ -287,10 +287,10 @@ class Basket extends \Kitodo\Dlf\Common\AbstractPlugin { $label = $this->pi_getLL('goBasket', '', TRUE); - $basketConf = array ( + $basketConf = [ 'parameter' => $this->conf['targetBasket'], 'title' => $label - ); + ]; $markerArray['###BASKET###'] = $this->cObj->typoLink($label, $basketConf); @@ -405,7 +405,7 @@ class Basket extends \Kitodo\Dlf\Common\AbstractPlugin { if ($page != NULL || $_piVars['addToBasket'] == 'list') { - $documentItem = array ( + $documentItem = [ 'id' => intval($_piVars['id']), 'startpage' => intval($_piVars['startpage']), 'endpage' => !isset($_piVars['endpage']) || $_piVars['endpage'] === "" ? "" : intval($_piVars['endpage']), @@ -414,7 +414,7 @@ class Basket extends \Kitodo\Dlf\Common\AbstractPlugin { 'endX' => !isset($_piVars['endX']) || $_piVars['endX'] === "" ? "" : intval($_piVars['endX']), 'endY' => !isset($_piVars['endY']) || $_piVars['endY'] === "" ? "" : intval($_piVars['endY']), 'rotation' => !isset($_piVars['rotation']) || $_piVars['rotation'] === "" ? "" : intval($_piVars['rotation']) - ); + ]; // update basket if (!empty($basketData['doc_ids'])) { @@ -425,7 +425,7 @@ class Basket extends \Kitodo\Dlf\Common\AbstractPlugin { } else { - $items = array (); + $items = []; } @@ -514,7 +514,7 @@ class Basket extends \Kitodo\Dlf\Common\AbstractPlugin { } - $update = array ('doc_ids' => json_encode($items)); + $update = ['doc_ids' => json_encode($items)]; $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update); @@ -522,7 +522,7 @@ class Basket extends \Kitodo\Dlf\Common\AbstractPlugin { } - return array ('basketData' => $basketData, 'jsOutput' => $output); + return ['basketData' => $basketData, 'jsOutput' => $output]; } @@ -572,11 +572,11 @@ class Basket extends \Kitodo\Dlf\Common\AbstractPlugin { if (empty($items)) { - $update = array ('doc_ids' => ''); + $update = ['doc_ids' => '']; } else { - $update = array ('doc_ids' => json_encode($items)); + $update = ['doc_ids' => json_encode($items)]; } @@ -701,13 +701,13 @@ class Basket extends \Kitodo\Dlf\Common\AbstractPlugin { } - return array ( + return [ 'downloadUrl' => $downloadUrl, 'downloadLink' => $downloadLink, 'pageNums' => $pageNums, 'urlParams' => $urlParams, 'record_id' => $document->recordId, - ); + ]; } @@ -801,7 +801,7 @@ class Basket extends \Kitodo\Dlf\Common\AbstractPlugin { ->setFrom($from) // Set the To addresses with an associative array - ->setTo(array ($mailData['mail'] => $mailData['name'])) + ->setTo([$mailData['mail'] => $mailData['name']]) ->setBody($mailBody, 'text/html') @@ -809,12 +809,12 @@ class Basket extends \Kitodo\Dlf\Common\AbstractPlugin { ; // protocol - $insertArray = array ( + $insertArray = [ 'pid' => $this->conf['pages'], 'file_name' => $pdfUrl, 'count_pages' => $numberOfPages, 'crdate' => time(), - ); + ]; if ($GLOBALS["TSFE"]->loginUser) { @@ -907,12 +907,12 @@ class Basket extends \Kitodo\Dlf\Common\AbstractPlugin { } // protocol - $insertArray = array ( + $insertArray = [ 'pid' => $this->conf['pages'], 'file_name' => $pdfUrl, 'count_pages' => $numberOfPages, 'crdate' => time(), - ); + ]; if ($GLOBALS["TSFE"]->loginUser) { diff --git a/Classes/Plugins/Calendar.php b/Classes/Plugins/Calendar.php index 8eb051fc..77e80523 100644 --- a/Classes/Plugins/Calendar.php +++ b/Classes/Plugins/Calendar.php @@ -84,16 +84,16 @@ class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin { // Process results. while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { - $issues[] = array ( + $issues[] = [ 'uid' => $resArray['uid'], 'title' => $resArray['title'], 'year' => $resArray['year'] - ); + ]; } // We need an array of issues with month number as key. - $calendarIssues = array (); + $calendarIssues = []; foreach ($issues as $issue) { @@ -101,7 +101,7 @@ class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin { } - $allIssues = array (); + $allIssues = []; // Get subpart templates. $subparts['list'] = $this->cObj->getSubpart($this->template, '###ISSUELIST###'); @@ -119,7 +119,7 @@ class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin { for ($i = 0; $i <= 11; $i++) { - $markerArray = array ( + $markerArray = [ '###DAYMON_NAME###' => strftime('%a', strtotime('last Monday')), '###DAYTUE_NAME###' => strftime('%a', strtotime('last Tuesday')), '###DAYWED_NAME###' => strftime('%a', strtotime('last Wednesday')), @@ -128,7 +128,7 @@ class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin { '###DAYSAT_NAME###' => strftime('%a', strtotime('last Saturday')), '###DAYSUN_NAME###' => strftime('%a', strtotime('last Sunday')), '###MONTHNAME###' => strftime('%B', strtotime($year.'-'.($i + 1).'-1')) - ); + ]; // Reset week content of new month. $subWeekPartContent = ''; @@ -142,7 +142,7 @@ class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin { $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart); - $weekArray = array ( + $weekArray = [ '###DAYMON###' => ' ', '###DAYTUE###' => ' ', '###DAYWED###' => ' ', @@ -150,7 +150,7 @@ class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin { '###DAYFRI###' => ' ', '###DAYSAT###' => ' ', '###DAYSUN###' => ' ', - ); + ]; // Every week has seven days. ;-) for ($k = 0; $k <= 6; $k++) { @@ -161,7 +161,7 @@ class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin { $dayLinks = ''; - $dayLinksText = array (); + $dayLinksText = []; $dayLinksList = ''; @@ -179,12 +179,12 @@ class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin { $dayLinkLabel = empty($issue['title']) ? strftime('%x', $currentDayTime) : $issue['title']; - $linkConf = array ( + $linkConf = [ 'useCacheHash' => 1, 'parameter' => $this->conf['targetPid'], 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($issue['uid']), 'ATagParams' => ' class="title"', - ); + ]; $dayLinksText[] = $this->cObj->typoLink($dayLinkLabel, $linkConf); @@ -254,20 +254,20 @@ class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin { } // Link to years overview - $linkConf = array ( + $linkConf = [ 'useCacheHash' => 1, 'parameter' => $this->conf['targetPid'], 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->parentId), - ); + ]; $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->parentId), $linkConf); // Link to current year. - $linkConf = array ( + $linkConf = [ 'useCacheHash' => 1, 'parameter' => $this->conf['targetPid'], 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->uid), - ); + ]; $yearLink = $this->cObj->typoLink($year, $linkConf); @@ -302,14 +302,14 @@ class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin { } - $markerArray = array ( + $markerArray = [ '###CALENDARVIEWACTIVE###' => $listViewActive ? '' : 'active', '###LISTVIEWACTIVE###' => $listViewActive ? 'active' : '', '###CALYEAR###' => $yearLink, '###CALALLYEARS###' => $allYearsLink, '###LABEL_CALENDAR###' => $this->pi_getLL('label.view_calendar'), '###LABEL_LIST_VIEW###' => $this->pi_getLL('label.view_list'), - ); + ]; $this->template = $this->cObj->substituteMarkerArray($this->template, $markerArray); @@ -363,10 +363,10 @@ class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin { // Process results. while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { - $years[] = array ( + $years[] = [ 'title' => $resArray['title'], 'uid' => $resArray['uid'] - ); + ]; } @@ -376,16 +376,16 @@ class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin { foreach ($years as $id => $year) { - $linkConf = array ( + $linkConf = [ 'useCacheHash' => 1, 'parameter' => $this->conf['targetPid'], 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($year['uid']), 'title' => $titleAnchor.': '.$year['title'] - ); + ]; - $yearArray = array ( + $yearArray = [ '###YEARNAME###' => $this->cObj->typoLink($year['title'], $linkConf), - ); + ]; $subYearPartContent .= $this->cObj->substituteMarkerArray($subparts['year'], $yearArray); @@ -393,18 +393,18 @@ class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin { } // link to years overview (should be itself here) - $linkConf = array ( + $linkConf = [ 'useCacheHash' => 1, 'parameter' => $this->conf['targetPid'], 'additionalParams' => '&'.$this->prefixId.'[id]='.$this->doc->uid, - ); + ]; $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->uid), $linkConf); // Fill markers. - $markerArray = array ( + $markerArray = [ '###LABEL_CHOOSE_YEAR###' => $this->pi_getLL('label.please_choose_year'), '###CALALLYEARS###' => $allYearsLink - ); + ]; $this->template = $this->cObj->substituteMarkerArray($this->template, $markerArray); diff --git a/Classes/Plugins/Collection.php b/Classes/Plugins/Collection.php index f207daaa..38fe576e 100644 --- a/Classes/Plugins/Collection.php +++ b/Classes/Plugins/Collection.php @@ -33,7 +33,7 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { * @var array * @access protected */ - protected $hookObjects = array (); + protected $hookObjects = []; /** * The main method of the PlugIn @@ -160,9 +160,9 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { // We only care about the UID and partOf in the results and want them sorted $params['fields'] = 'uid,partof'; - $params['sort'] = array ('uid' => 'asc'); + $params['sort'] = ['uid' => 'asc']; - $collections = array (); + $collections = []; while ($collectionData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { @@ -178,7 +178,7 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { } - $markerArray = array (); + $markerArray = []; // Process results. foreach ($collections as $collection) { @@ -200,7 +200,7 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { $partOfSomething = $solr->search_raw($solr_query.' AND NOT partof:0', $params); // Titles are all documents that are "root" elements i.e. partof == 0 - $collection['titles'] = array (); + $collection['titles'] = []; foreach ($partOfNothing as $doc) { @@ -230,7 +230,7 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { } while (!empty($markerArray[$_key])); // Merge plugin variables with new set of values. - $additionalParams = array ('collection' => $collection['uid']); + $additionalParams = ['collection' => $collection['uid']]; if (is_array($this->piVars)) { @@ -243,11 +243,11 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { } // Build typolink configuration array. - $conf = array ( + $conf = [ 'useCacheHash' => 1, 'parameter' => $GLOBALS['TSFE']->id, 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) - ); + ]; // Link collection's title to list view. $markerArray[$_key]['###TITLE###'] = $this->cObj->typoLink(htmlspecialchars($collection['label']), $conf); @@ -257,7 +257,7 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { $img = ''.$this->pi_getLL('feedAlt', '', TRUE).''; - $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, array ($this->prefixId => array ('collection' => $collection['uid'])), FALSE, $this->conf['targetFeed']); + $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, [$this->prefixId => ['collection' => $collection['uid']]], FALSE, $this->conf['targetFeed']); } else { @@ -387,7 +387,7 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { } $params['fields'] = 'uid'; - $params['sort'] = array ('uid' => 'asc'); + $params['sort'] = ['uid' => 'asc']; $solrResult = $solr->search_raw($solr_query, $params); @@ -412,11 +412,11 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { '' ); - $toplevel = array (); + $toplevel = []; - $subparts = array (); + $subparts = []; - $listMetadata = array (); + $listMetadata = []; // Process results. while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($documents)) { @@ -429,21 +429,21 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { if (empty($listMetadata)) { - $listMetadata = array ( + $listMetadata = [ 'label' => !empty($l10nOverlay['label']) ? htmlspecialchars($l10nOverlay['label']) : htmlspecialchars($collectionData['collLabel']), 'description' => !empty($l10nOverlay['description']) ? $this->pi_RTEcssText($l10nOverlay['description']) : $this->pi_RTEcssText($collectionData['collDesc']), 'thumbnail' => htmlspecialchars($collectionData['collThumb']), - 'options' => array ( + 'options' => [ 'source' => 'collection', 'select' => $id, 'userid' => $collectionData['userid'], - 'params' => array ('filterquery' => array (array ('query' => 'collection_faceting:("'.$collectionData['index_name'].'")'))), + 'params' => ['filterquery' => [['query' => 'collection_faceting:("'.$collectionData['index_name'].'")']]], 'core' => '', 'pid' => $this->conf['pages'], 'order' => 'title', 'order.asc' => TRUE - ) - ); + ] + ]; } @@ -471,12 +471,12 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { } - $toplevel[$resArray['uid']] = array ( + $toplevel[$resArray['uid']] = [ 'u' => $resArray['uid'], 'h' => '', 's' => $sorting, - 'p' => array () - ); + 'p' => [] + ]; } else { @@ -495,7 +495,7 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { foreach ($parts as $part) { - $toplevel[$partof]['p'][] = array ('u' => $part); + $toplevel[$partof]['p'][] = ['u' => $part]; } @@ -520,7 +520,7 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { \TYPO3\CMS\Core\Utility\GeneralUtility::cleanOutputBuffers(); // Send headers. - header('Location: '.\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL(array ('parameter' => $this->conf['targetPid'])))); + header('Location: '.\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL(['parameter' => $this->conf['targetPid']]))); // Flush output buffer and end script processing. ob_end_flush(); diff --git a/Classes/Plugins/Eid/PageViewProxy.php b/Classes/Plugins/Eid/PageViewProxy.php index 518350e8..0ce93b9e 100644 --- a/Classes/Plugins/Eid/PageViewProxy.php +++ b/Classes/Plugins/Eid/PageViewProxy.php @@ -34,7 +34,7 @@ class PageViewProxy extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin { * * @return string */ - public function main($content = '', $conf = array ()) { + public function main($content = '', $conf = []) { $this->cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class); diff --git a/Classes/Plugins/Eid/SearchSuggest.php b/Classes/Plugins/Eid/SearchSuggest.php index 637ae54e..21663076 100644 --- a/Classes/Plugins/Eid/SearchSuggest.php +++ b/Classes/Plugins/Eid/SearchSuggest.php @@ -37,7 +37,7 @@ class SearchSuggest extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin { * * @return string XML response of search suggestions */ - public function main($content = '', $conf = array ()) { + public function main($content = '', $conf = []) { if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('encrypted') != '' && \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('hashed') != '') { diff --git a/Classes/Plugins/Feeds.php b/Classes/Plugins/Feeds.php index 7b3bb45b..82b734fe 100644 --- a/Classes/Plugins/Feeds.php +++ b/Classes/Plugins/Feeds.php @@ -169,11 +169,11 @@ class Feeds extends \Kitodo\Dlf\Common\AbstractPlugin { $item->appendChild($rss->createElement('title', htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8'))); // Add link. - $linkConf = array ( + $linkConf = [ 'parameter' => $this->conf['targetPid'], 'forceAbsoluteUrl' => 1, - 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, array ('id' => $resArray['uid']), '', TRUE, FALSE) - ); + 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, ['id' => $resArray['uid']], '', TRUE, FALSE) + ]; $item->appendChild($rss->createElement('link', htmlspecialchars($this->cObj->typoLink_URL($linkConf), ENT_NOQUOTES, 'UTF-8'))); diff --git a/Classes/Plugins/ListView.php b/Classes/Plugins/ListView.php index 35191b62..4e9f0d7f 100644 --- a/Classes/Plugins/ListView.php +++ b/Classes/Plugins/ListView.php @@ -36,7 +36,7 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { * @var array * @access private */ - private $fieldwrap = array (); + private $fieldwrap = []; /** * This holds the list @@ -52,7 +52,7 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { * @var array * @access protected */ - protected $metadata = array (); + protected $metadata = []; /** * Array of sortable metadata @@ -60,7 +60,7 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { * @var array * @access protected */ - protected $sortables = array (); + protected $sortables = []; /** * Renders the page browser @@ -87,7 +87,7 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { // Add link to previous page. if ($this->piVars['pointer'] > 0) { - $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '<', TRUE), array ('pointer' => $this->piVars['pointer'] - 1), TRUE).$separator; + $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '<', TRUE), ['pointer' => $this->piVars['pointer'] - 1], TRUE).$separator; } else { @@ -106,7 +106,7 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { if ($this->piVars['pointer'] != $i) { - $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1), array ('pointer' => $i), TRUE).$separator; + $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1), ['pointer' => $i], TRUE).$separator; } else { @@ -131,7 +131,7 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { // Add link to next page. if ($this->piVars['pointer'] < $maxPages - 1) { - $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '>', TRUE), array ('pointer' => $this->piVars['pointer'] + 1), TRUE); + $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '>', TRUE), ['pointer' => $this->piVars['pointer'] + 1], TRUE); } else { @@ -206,10 +206,10 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { $imgAlt = htmlspecialchars($value); - $additionalParams = array ( + $additionalParams = [ 'id' => $this->list[$number]['uid'], 'page' => $this->list[$number]['page'] - ); + ]; if (!empty($this->piVars['logicalPage'])) { @@ -217,11 +217,11 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { } - $conf = array ( + $conf = [ 'useCacheHash' => 1, 'parameter' => $this->conf['targetPid'], 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) - ); + ]; $value = $this->cObj->typoLink(htmlspecialchars($value), $conf); @@ -293,13 +293,13 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { if (!empty($this->conf['basketButton']) && !empty($this->conf['targetBasket'])) { - $additionalParams = array ('id' => $this->list[$number]['uid'], 'startpage' => $this->list[$number]['page'], 'addToBasket' => 'list'); + $additionalParams = ['id' => $this->list[$number]['uid'], 'startpage' => $this->list[$number]['page'], 'addToBasket' => 'list']; - $conf = array ( + $conf = [ 'useCacheHash' => 1, 'parameter' => $this->conf['targetBasket'], 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) - ); + ]; $link = $this->cObj->typoLink($this->pi_getLL('addBasket', '', TRUE), $conf); @@ -355,13 +355,13 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { $prefix = str_replace('_', '-', get_class($this)); // Configure @action URL for form. - $linkConf = array ( + $linkConf = [ 'parameter' => $GLOBALS['TSFE']->id - ); + ]; if (!empty($this->piVars['logicalPage'])) { - $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, array ('logicalPage' => $this->piVars['logicalPage']), '', TRUE, FALSE); + $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, ['logicalPage' => $this->piVars['logicalPage']], '', TRUE, FALSE); } @@ -476,11 +476,11 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { $imgAlt = htmlspecialchars($value); - $additionalParams = array ( + $additionalParams = [ 'id' => $subpart['uid'], 'page' => $subpart['page'], 'highlight_word' => $highlight_word - ); + ]; if (!empty($this->piVars['logicalPage'])) { @@ -488,12 +488,12 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { } - $conf = array ( + $conf = [ // we don't want cHash in case of search parameters 'useCacheHash' => empty($this->list->metadata['searchString']) ? 1 : 0, 'parameter' => $this->conf['targetPid'], 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) - ); + ]; $value = $this->cObj->typoLink(htmlspecialchars($value), $conf); @@ -568,13 +568,13 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { if (!empty($this->conf['basketButton']) && !empty($this->conf['targetBasket'])) { - $additionalParams = array ('id' => $this->list[$number]['uid'], 'startpage' => $subpart['page'], 'endpage' => $subpart['page'], 'logId' => $subpart['sid'], 'addToBasket' => 'subentry'); + $additionalParams = ['id' => $this->list[$number]['uid'], 'startpage' => $subpart['page'], 'endpage' => $subpart['page'], 'logId' => $subpart['sid'], 'addToBasket' => 'subentry']; - $conf = array ( + $conf = [ 'useCacheHash' => 1, 'parameter' => $this->conf['targetBasket'], 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) - ); + ]; $link = $this->cObj->typoLink($this->pi_getLL('addBasket', '', TRUE), $conf); @@ -612,10 +612,10 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { if ($resArray['is_listed']) { - $this->metadata[$resArray['index_name']] = array ( + $this->metadata[$resArray['index_name']] = [ 'wrap' => $resArray['wrap'], 'label' => Helper::translate($resArray['index_name'], 'tx_dlf_metadata', $this->conf['pages']) - ); + ]; } @@ -685,7 +685,7 @@ class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { || (isset($this->piVars['asc']) && $this->piVars['asc'] != $listMetadata['options']['order.asc'])) { // Update list's metadata. - $listMetadata['options']['params']['sort'] = array ($this->piVars['order']."_sorting" => (boolean) $this->piVars['asc']?'asc':'desc'); + $listMetadata['options']['params']['sort'] = [$this->piVars['order']."_sorting" => (boolean) $this->piVars['asc']?'asc':'desc']; $listMetadata['options']['order'] = $this->piVars['order']; $listMetadata['options']['order.asc'] = (boolean) $this->piVars['asc']; diff --git a/Classes/Plugins/Metadata.php b/Classes/Plugins/Metadata.php index f9b7d1d8..a8d8e180 100644 --- a/Classes/Plugins/Metadata.php +++ b/Classes/Plugins/Metadata.php @@ -33,7 +33,7 @@ class Metadata extends \Kitodo\Dlf\Common\AbstractPlugin { * @var array * @access protected */ - protected $hookObjects = array (); + protected $hookObjects = []; /** * The main method of the PlugIn @@ -71,12 +71,12 @@ class Metadata extends \Kitodo\Dlf\Common\AbstractPlugin { } - $metadata = array (); + $metadata = []; if ($this->conf['rootline'] < 2) { // Get current structure's @ID. - $ids = array (); + $ids = []; if (!empty($this->doc->physicalStructure[$this->piVars['page']]) && !empty($this->doc->smLinks['p2l'][$this->doc->physicalStructure[$this->piVars['page']]])) { @@ -205,7 +205,7 @@ class Metadata extends \Kitodo\Dlf\Common\AbstractPlugin { $subpart['block'] = $this->cObj->getSubpart($this->template, '###BLOCK###'); // Get list of metadata to show. - $metaList = array (); + $metaList = []; $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.is_listed AS is_listed,tx_dlf_metadata.wrap AS wrap', @@ -231,10 +231,10 @@ class Metadata extends \Kitodo\Dlf\Common\AbstractPlugin { // do stuff with the row entry data like built HTML or prepare further usage if ($this->conf['showFull'] || $resArray['is_listed']) { - $metaList[$resArray['index_name']] = array ( + $metaList[$resArray['index_name']] = [ 'wrap' => $resArray['wrap'], 'label' => Helper::translate($resArray['index_name'], 'tx_dlf_metadata', $this->conf['pages']) - ); + ]; } @@ -243,7 +243,7 @@ class Metadata extends \Kitodo\Dlf\Common\AbstractPlugin { } // Get list of collections to show. - $collList = array (); + $collList = []; $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'tx_dlf_collections.index_name AS index_name', @@ -321,7 +321,7 @@ class Metadata extends \Kitodo\Dlf\Common\AbstractPlugin { $details = $this->doc->getLogicalStructure($metadata['_id']); - $value = $this->pi_linkTP($value, array ($this->prefixId => array ('id' => $this->doc->uid, 'page' => (!empty($details['points']) ? intval($details['points']) : 1))), TRUE, $this->conf['targetPid']); + $value = $this->pi_linkTP($value, [$this->prefixId => ['id' => $this->doc->uid, 'page' => (!empty($details['points']) ? intval($details['points']) : 1)]], TRUE, $this->conf['targetPid']); } diff --git a/Classes/Plugins/Navigation.php b/Classes/Plugins/Navigation.php index e530a3af..472ea1e7 100644 --- a/Classes/Plugins/Navigation.php +++ b/Classes/Plugins/Navigation.php @@ -43,11 +43,11 @@ class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin { if (count($list) > 0) { // Build typolink configuration array. - $conf = array ( + $conf = [ 'useCacheHash' => 1, 'parameter' => $this->conf['targetPid'], 'title' => $this->pi_getLL('linkToList', '', TRUE) - ); + ]; return $this->cObj->typoLink($this->pi_getLL('linkToList', '', TRUE), $conf); @@ -69,9 +69,9 @@ class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin { protected function getPageSelector() { // Configure @action URL for form. - $linkConf = array ( + $linkConf = [ 'parameter' => $GLOBALS['TSFE']->id - ); + ]; $output = '
'; @@ -174,7 +174,7 @@ class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin { // Link to first page. if ($this->piVars['page'] > 1) { - $markerArray['###FIRST###'] = $this->makeLink($this->pi_getLL('firstPage', '', TRUE), array ('page' => 1)); + $markerArray['###FIRST###'] = $this->makeLink($this->pi_getLL('firstPage', '', TRUE), ['page' => 1]); } else { @@ -185,7 +185,7 @@ class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin { // Link back X pages. if ($this->piVars['page'] > $pageSteps) { - $markerArray['###BACK###'] = $this->makeLink(sprintf($this->pi_getLL('backXPages', '', TRUE), $pageSteps), array ('page' => $this->piVars['page'] - $pageSteps)); + $markerArray['###BACK###'] = $this->makeLink(sprintf($this->pi_getLL('backXPages', '', TRUE), $pageSteps), ['page' => $this->piVars['page'] - $pageSteps]); } else { @@ -196,7 +196,7 @@ class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin { // Link to previous page. if ($this->piVars['page'] > (1 + $this->piVars['double'])) { - $markerArray['###PREVIOUS###'] = $this->makeLink($this->pi_getLL('prevPage', '', TRUE), array ('page' => $this->piVars['page'] - (1 + $this->piVars['double']))); + $markerArray['###PREVIOUS###'] = $this->makeLink($this->pi_getLL('prevPage', '', TRUE), ['page' => $this->piVars['page'] - (1 + $this->piVars['double'])]); } else { @@ -207,7 +207,7 @@ class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin { // Link to next page. if ($this->piVars['page'] < ($this->doc->numPages - $this->piVars['double'])) { - $markerArray['###NEXT###'] = $this->makeLink($this->pi_getLL('nextPage', '', TRUE), array ('page' => $this->piVars['page'] + (1 + $this->piVars['double']))); + $markerArray['###NEXT###'] = $this->makeLink($this->pi_getLL('nextPage', '', TRUE), ['page' => $this->piVars['page'] + (1 + $this->piVars['double'])]); } else { @@ -218,7 +218,7 @@ class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin { // Link forward X pages. if ($this->piVars['page'] <= ($this->doc->numPages - $pageSteps)) { - $markerArray['###FORWARD###'] = $this->makeLink(sprintf($this->pi_getLL('forwardXPages', '', TRUE), $pageSteps), array ('page' => $this->piVars['page'] + $pageSteps)); + $markerArray['###FORWARD###'] = $this->makeLink(sprintf($this->pi_getLL('forwardXPages', '', TRUE), $pageSteps), ['page' => $this->piVars['page'] + $pageSteps]); } else { @@ -229,7 +229,7 @@ class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin { // Link to last page. if ($this->piVars['page'] < $this->doc->numPages) { - $markerArray['###LAST###'] = $this->makeLink($this->pi_getLL('lastPage', '', TRUE), array ('page' => $this->doc->numPages)); + $markerArray['###LAST###'] = $this->makeLink($this->pi_getLL('lastPage', '', TRUE), ['page' => $this->doc->numPages]); } else { @@ -242,17 +242,17 @@ class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin { if (!$this->piVars['double']) { - $markerArray['###DOUBLEPAGE###'] = $this->makeLink($this->pi_getLL('doublePageOn', '', TRUE), array ('double' => 1), 'class="tx-dlf-navigation-doubleOn"'); + $markerArray['###DOUBLEPAGE###'] = $this->makeLink($this->pi_getLL('doublePageOn', '', TRUE), ['double' => 1], 'class="tx-dlf-navigation-doubleOn"'); } else { - $markerArray['###DOUBLEPAGE###'] = $this->makeLink($this->pi_getLL('doublePageOff', '', TRUE), array ('double' => 0), 'class="tx-dlf-navigation-doubleOff"'); + $markerArray['###DOUBLEPAGE###'] = $this->makeLink($this->pi_getLL('doublePageOff', '', TRUE), ['double' => 0], 'class="tx-dlf-navigation-doubleOff"'); } if ($this->piVars['double'] && $this->piVars['page'] < $this->doc->numPages) { - $markerArray['###DOUBLEPAGE+1###'] = $this->makeLink($this->pi_getLL('doublePage+1', '', TRUE), array ('page' => $this->piVars['page'] + 1)); + $markerArray['###DOUBLEPAGE+1###'] = $this->makeLink($this->pi_getLL('doublePage+1', '', TRUE), ['page' => $this->piVars['page'] + 1]); } else { @@ -300,7 +300,7 @@ class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin { * * @return string Typolink ready to output */ - protected function makeLink($label, array $overrulePIvars = array (), $aTagParams = '') { + protected function makeLink($label, array $overrulePIvars = [], $aTagParams = '') { // Merge plugin variables with new set of values. if (is_array($this->piVars)) { @@ -314,13 +314,13 @@ class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin { } // Build typolink configuration array. - $conf = array ( + $conf = [ 'useCacheHash' => 1, 'parameter' => $GLOBALS['TSFE']->id, 'ATagParams' => $aTagParams, 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $overrulePIvars, '', TRUE, FALSE), 'title' => $label - ); + ]; return $this->cObj->typoLink($label, $conf); diff --git a/Classes/Plugins/OaiPmh.php b/Classes/Plugins/OaiPmh.php index 58627b13..2561fb32 100644 --- a/Classes/Plugins/OaiPmh.php +++ b/Classes/Plugins/OaiPmh.php @@ -49,23 +49,23 @@ class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin { * @var array * @access protected */ - protected $formats = array ( - 'oai_dc' => array ( + protected $formats = [ + 'oai_dc' => [ 'schema' => 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd', 'namespace' => 'http://www.openarchives.org/OAI/2.0/oai_dc/', - 'requiredFields' => array ('record_id'), - ), - 'epicur' => array ( + 'requiredFields' => ['record_id'], + ], + 'epicur' => [ 'schema' => 'http://www.persistent-identifier.de/xepicur/version1.0/xepicur.xsd', 'namespace' => 'urn:nbn:de:1111-2004033116', - 'requiredFields' => array ('purl', 'urn'), - ), - 'mets' => array ( + 'requiredFields' => ['purl', 'urn'], + ], + 'mets' => [ 'schema' => 'http://www.loc.gov/standards/mets/version17/mets.v1-7.xsd', 'namespace' => 'http://www.loc.gov/METS/', - 'requiredFields' => array ('location'), - ) - ); + 'requiredFields' => ['location'], + ] + ]; /** * Delete expired resumption tokens @@ -115,7 +115,7 @@ class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin { */ protected function getUrlParams() { - $allowedParams = array ( + $allowedParams = [ 'verb', 'identifier', 'metadataPrefix', @@ -123,10 +123,10 @@ class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin { 'until', 'set', 'resumptionToken' - ); + ]; // Clear plugin variables. - $this->piVars = array (); + $this->piVars = []; // Set only allowed parameters. foreach ($allowedParams as $param) { @@ -428,10 +428,10 @@ class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin { } // Add request. - $linkConf = array ( + $linkConf = [ 'parameter' => $GLOBALS['TSFE']->id, 'forceAbsoluteUrl' => 1 - ); + ]; $request = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'request', htmlspecialchars($this->cObj->typoLink_URL($linkConf), ENT_NOQUOTES, 'UTF-8')); @@ -650,10 +650,10 @@ class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin { $this->devLog('[\Kitodo\Dlf\Plugins\OaiPmh->verbIdentify()] No records found with PID "'.$this->conf['pages'].'"', SYSLOG_SEVERITY_NOTICE); } - $linkConf = array ( + $linkConf = [ 'parameter' => $GLOBALS['TSFE']->id, 'forceAbsoluteUrl' => 1 - ); + ]; $baseURL = htmlspecialchars($this->cObj->typoLink_URL($linkConf), ENT_NOQUOTES); // Add identification node. @@ -707,10 +707,10 @@ class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin { $resultSet->reset(); $resultSet->add($documentSet); - $resultSet->metadata = array ( + $resultSet->metadata = [ 'completeListSize' => count($documentSet), 'metadataPrefix' => $this->piVars['metadataPrefix'], - ); + ]; return $this->generateOutputForDocumentList($resultSet); @@ -725,7 +725,7 @@ class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin { */ protected function verbListMetadataFormats() { - $resArray = array (); + $resArray = []; // Check for invalid arguments. if (count($this->piVars) > 1) { @@ -816,10 +816,10 @@ class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin { $resultSet->reset(); $resultSet->add($documentSet); - $resultSet->metadata = array ( + $resultSet->metadata = [ 'completeListSize' => count($documentSet), 'metadataPrefix' => $this->piVars['metadataPrefix'], - ); + ]; return $this->generateOutputForDocumentList($resultSet); } @@ -979,7 +979,7 @@ class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin { $solr_query .= ' AND timestamp:['.$from.' TO '.$until.']'; - $documentSet = array (); + $documentSet = []; $solr = Solr::getInstance($this->conf['solrcore']); @@ -988,12 +988,12 @@ class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin { } // We only care about the UID in the results and want them sorted - $parameters = array ( + $parameters = [ "fields" => "uid", - "sort" => array ( + "sort" => [ "uid" => "asc" - ) - ); + ] + ]; $result = $solr->search_raw($solr_query, $parameters); @@ -1115,12 +1115,12 @@ class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin { $GLOBALS['TYPO3_DB']->exec_INSERTquery( 'tx_dlf_tokens', - array ( + [ 'tstamp' => $GLOBALS['EXEC_TIME'], 'token' => $token, 'options' => serialize($documentListSet), 'ident' => 'oai', - ) + ] ); if ($GLOBALS['TYPO3_DB']->sql_affected_rows() == 1) { diff --git a/Classes/Plugins/PageGrid.php b/Classes/Plugins/PageGrid.php index ed387d37..34083640 100644 --- a/Classes/Plugins/PageGrid.php +++ b/Classes/Plugins/PageGrid.php @@ -79,12 +79,12 @@ class PageGrid extends \Kitodo\Dlf\Common\AbstractPlugin { $piVars['page'] = $number; - $linkConf = array ( + $linkConf = [ 'useCacheHash' => 1, 'parameter' => $this->conf['targetPid'], 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $piVars, '', TRUE, FALSE), 'title' => $markerArray['###PAGINATION###'] - ); + ]; $markerArray['###THUMBNAIL###'] = $this->cObj->typoLink($thumbnail, $linkConf); @@ -117,7 +117,7 @@ class PageGrid extends \Kitodo\Dlf\Common\AbstractPlugin { // Add link to previous page. if ($this->piVars['pointer'] > 0) { - $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '<', TRUE), array ('pointer' => $this->piVars['pointer'] - 1, 'page' => (($this->piVars['pointer'] - 1) * $this->conf['limit']) + 1), TRUE).$separator; + $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '<', TRUE), ['pointer' => $this->piVars['pointer'] - 1, 'page' => (($this->piVars['pointer'] - 1) * $this->conf['limit']) + 1], TRUE).$separator; } else { @@ -134,7 +134,7 @@ class PageGrid extends \Kitodo\Dlf\Common\AbstractPlugin { if ($this->piVars['pointer'] != $i) { - $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1), array ('pointer' => $i, 'page' => ($i * $this->conf['limit']) + 1), TRUE).$separator; + $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1), ['pointer' => $i, 'page' => ($i * $this->conf['limit']) + 1], TRUE).$separator; } else { @@ -159,7 +159,7 @@ class PageGrid extends \Kitodo\Dlf\Common\AbstractPlugin { // Add link to next page. if ($this->piVars['pointer'] < $maxPages - 1) { - $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '>', TRUE), array ('pointer' => $this->piVars['pointer'] + 1, 'page' => ($this->piVars['pointer'] + 1) * $this->conf['limit'] + 1), TRUE); + $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '>', TRUE), ['pointer' => $this->piVars['pointer'] + 1, 'page' => ($this->piVars['pointer'] + 1) * $this->conf['limit'] + 1], TRUE); } else { diff --git a/Classes/Plugins/PageView.php b/Classes/Plugins/PageView.php index 57edf918..3cf3276c 100644 --- a/Classes/Plugins/PageView.php +++ b/Classes/Plugins/PageView.php @@ -29,7 +29,7 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { * @var array * @access protected */ - protected $controls = array (); + protected $controls = []; /** * Holds the current images' URLs and MIME types @@ -37,7 +37,7 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { * @var array * @access protected */ - protected $images = array (); + protected $images = []; /** * Holds the current fulltexts' URLs @@ -45,7 +45,7 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { * @var array * @access protected */ - protected $fulltexts = array (); + protected $fulltexts = []; /** * Adds Viewer javascript @@ -56,7 +56,7 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { */ protected function addViewerJS() { - $output = array (); + $output = []; // Add OpenLayers library. $output[] = ''; @@ -111,7 +111,7 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { */ protected function addInteraction() { - $markerArray = array (); + $markerArray = []; if ($this->piVars['id']) { @@ -159,17 +159,17 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { */ protected function addBasketForm() { - $markerArray = array (); + $markerArray = []; // Add basket button if ($this->conf['basketButton'] && $this->conf['targetBasket'] && $this->piVars['id']) { $label = $this->pi_getLL('addBasket', '', TRUE); - $params = array ( + $params = [ 'id' => $this->piVars['id'], 'addToBasket' => TRUE - ); + ]; if (empty($this->piVars['page'])) { @@ -177,11 +177,11 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { } - $basketConf = array ( + $basketConf = [ 'parameter' => $this->conf['targetBasket'], 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', TRUE, FALSE), 'title' => $label - ); + ]; $output = ''; @@ -236,7 +236,7 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { */ protected function getImage($page) { - $image = array (); + $image = []; // Get @USE value of METS fileGrp. $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['fileGrps']); @@ -250,10 +250,10 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { if ($this->conf['useInternalProxy']) { // Configure @action URL for form. - $linkConf = array ( + $linkConf = [ 'parameter' => $GLOBALS['TSFE']->id, 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url='.urlencode($image['url']), - ); + ]; $image['url'] = $this->cObj->typoLink_URL($linkConf); } @@ -289,7 +289,7 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { */ protected function getFulltext($page) { - $fulltext = array (); + $fulltext = []; // Get fulltext link. if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$this->conf['fileGrpFulltext']])) { @@ -297,10 +297,10 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { $fulltext['url'] = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$this->conf['fileGrpFulltext']]); // Configure @action URL for form. - $linkConf = array ( + $linkConf = [ 'parameter' => $GLOBALS['TSFE']->id, 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url='.urlencode($fulltext['url']), - ); + ]; $fulltext['url'] = $this->cObj->typoLink_URL($linkConf); @@ -386,9 +386,9 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { $this->controls = explode(',', $this->conf['features']); // Fill in the template markers. - $markerArray = array ( + $markerArray = [ '###VIEWER_JS###' => $this->addViewerJS() - ); + ]; $markerArray = array_merge($markerArray, $this->addInteraction(), $this->addBasketForm()); diff --git a/Classes/Plugins/Search.php b/Classes/Plugins/Search.php index be80c421..caf091b7 100644 --- a/Classes/Plugins/Search.php +++ b/Classes/Plugins/Search.php @@ -206,7 +206,7 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { // Get operator options. $operatorOptions = ''; - foreach (array ('AND', 'OR', 'NOT') as $operator) { + foreach (['AND', 'OR', 'NOT'] as $operator) { $operatorOptions .= ''; @@ -225,11 +225,11 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { for ($i = 0; $i < $this->conf['extendedSlotCount']; $i++) { - $markerArray = array ( + $markerArray = [ '###EXT_SEARCH_OPERATOR###' => '', '###EXT_SEARCH_FIELDSELECTOR###' => '', '###EXT_SEARCH_FIELDQUERY###' => '' - ); + ]; $extendedSearch .= $this->cObj->substituteMarkerArray($this->cObj->getSubpart($this->template, '###EXT_SEARCH_ENTRY###'), $markerArray); @@ -269,7 +269,7 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { } // Get facets from plugin configuration. - $facets = array (); + $facets = []; foreach (\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['facets'], TRUE) as $facet) { @@ -278,7 +278,7 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { } // Render facets menu. - $TSconfig = array (); + $TSconfig = []; $TSconfig['special'] = 'userfunction'; @@ -361,7 +361,7 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { */ protected function getFacetsMenuEntry($field, $value, $count, $search, &$state) { - $entryArray = array (); + $entryArray = []; // Translate value. if ($field == 'owner_faceting') { @@ -414,7 +414,7 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { //remove ($count) for selected facet in template $entryArray['count'] = FALSE; //build link to delete selected facet - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('query' => $search['query'], 'fq' => $queryColumn)); + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(['query' => $search['query'], 'fq' => $queryColumn]); $entryArray['title'] = sprintf($this->pi_getLL('resetFacet', ''), $entryArray['title']); } @@ -427,7 +427,7 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { } - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('query' => $search['query'], 'fq' => $queryColumn)); + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(['query' => $search['query'], 'fq' => $queryColumn]); return $entryArray; @@ -491,12 +491,12 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { $this->getTemplate(); // Configure @action URL for form. - $linkConf = array ( + $linkConf = [ 'parameter' => $GLOBALS['TSFE']->id - ); + ]; // Fill markers. - $markerArray = array ( + $markerArray = [ '###ACTION_URL###' => $this->cObj->typoLink_URL($linkConf), '###LABEL_QUERY###' => (!empty($search['query']) ? htmlspecialchars($search['query']) : $this->pi_getLL('label.query')), '###LABEL_SUBMIT###' => $this->pi_getLL('label.submit'), @@ -508,7 +508,7 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { '###ADDITIONAL_INPUTS###' => $this->addEncryptedCoreName(), '###FACETS_MENU###' => $this->addFacetsMenu(), '###LOGICAL_PAGE###' => $this->addLogicalPage() - ); + ]; // Get additional fields for extended search. $extendedSearch = $this->addExtendedSearch(); @@ -545,9 +545,9 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { } // Prepare query parameters. - $params = array (); + $params = []; - $matches = array (); + $matches = []; // Set search query. if ((!empty($this->conf['fulltext']) && !empty($this->piVars['fulltext'])) || preg_match('/fulltext:\((.*)\)/', $this->piVars['query'], $matches)) { @@ -571,7 +571,7 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { // Add extended search query. if (!empty($this->piVars['extQuery']) && is_array($this->piVars['extQuery'])) { - $allowedOperators = array ('AND', 'OR', 'NOT'); + $allowedOperators = ['AND', 'OR', 'NOT']; $allowedFields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['extendedFields'], TRUE); @@ -641,7 +641,7 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { $collIds = explode(',', $this->conf['collections']); - $collIndexNames = array (); + $collIndexNames = []; foreach ($collIds as $collId) { @@ -658,7 +658,7 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { $params['query'] = $query; $params['start'] = 0; $params['rows'] = 0; - $params['sort'] = array ('score' => 'desc'); + $params['sort'] = ['score' => 'desc']; // Instantiate search object. $solr = Solr::getInstance($this->conf['solrcore']); @@ -682,20 +682,20 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { // Perform search. $list = $solr->search(); - $list->metadata = array ( + $list->metadata = [ 'label' => $label, 'thumbnail' => '', 'searchString' => $this->piVars['query'], 'fulltextSearch' => (!empty($this->piVars['fulltext']) ? '1' : '0'), 'options' => $list->metadata['options'] - ); + ]; $list->save(); // Clean output buffer. \TYPO3\CMS\Core\Utility\GeneralUtility::cleanOutputBuffers(); - $additionalParams = array (); + $additionalParams = []; if (!empty($this->piVars['logicalPage'])) { @@ -754,19 +754,19 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { $this->init($conf); - $menuArray = array (); + $menuArray = []; // Set default value for facet search. - $search = array ( + $search = [ 'query' => '*', - 'params' => array ( - 'component' => array ( - 'facetset' => array ( - 'facet' => array () - ) - ) - ) - ); + 'params' => [ + 'component' => [ + 'facetset' => [ + 'facet' => [] + ] + ] + ] + ]; // Extract query and filter from last search. $list = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(DocumentList::class); @@ -794,26 +794,26 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { } - return array (); + return []; } // Set needed parameters for facet search. if (empty($search['params']['filterquery'])) { - $search['params']['filterquery'] = array (); + $search['params']['filterquery'] = []; } foreach ($this->conf['facets'] as $field => $name) { - $search['params']['component']['facetset']['facet'][] = array ( + $search['params']['component']['facetset']['facet'][] = [ 'type' => 'field', 'key' => $field, 'field' => $field, 'limit' => $this->conf['limitFacets'], 'sort' => isset($this->conf['sortingFacets']) ? $this->conf['sortingFacets'] : 'count' - ); + ]; } @@ -832,7 +832,7 @@ class Search extends \Kitodo\Dlf\Common\AbstractPlugin { // Process results. foreach ($facet as $field => $values) { - $entryArray = array (); + $entryArray = []; $entryArray['title'] = htmlspecialchars($this->conf['facets'][$field]); diff --git a/Classes/Plugins/Statistics.php b/Classes/Plugins/Statistics.php index ca327725..e94927a8 100644 --- a/Classes/Plugins/Statistics.php +++ b/Classes/Plugins/Statistics.php @@ -112,16 +112,16 @@ class Statistics extends \Kitodo\Dlf\Common\AbstractPlugin { $countVolumes = $GLOBALS['TYPO3_DB']->sql_num_rows($resultVolumes); // Set replacements. - $replace = array ( - 'key' => array ( + $replace = [ + 'key' => [ '###TITLES###', '###VOLUMES###' - ), - 'value' => array ( + ], + 'value' => [ $countTitles.($countTitles > 1 ? $this->pi_getLL('titles', '', TRUE) : $this->pi_getLL('title', '', TRUE)), $countVolumes.($countVolumes > 1 ? $this->pi_getLL('volumes', '', TRUE) : $this->pi_getLL('volume', '', TRUE)) - ) - ); + ] + ]; // Apply replacements. $content = str_replace($replace['key'], $replace['value'], $content); diff --git a/Classes/Plugins/TableOfContents.php b/Classes/Plugins/TableOfContents.php index 002d40c0..879f126a 100644 --- a/Classes/Plugins/TableOfContents.php +++ b/Classes/Plugins/TableOfContents.php @@ -31,7 +31,7 @@ class TableOfContents extends \Kitodo\Dlf\Common\AbstractPlugin { * @var array * @access protected */ - protected $activeEntries = array (); + protected $activeEntries = []; /** * This builds an array for one menu entry @@ -45,7 +45,7 @@ class TableOfContents extends \Kitodo\Dlf\Common\AbstractPlugin { */ protected function getMenuEntry(array $entry, $recursive = FALSE) { - $entryArray = array (); + $entryArray = []; // Set "title", "volume", "type" and "pagination" from $entry array. $entryArray['title'] = $entry['label']; @@ -67,37 +67,37 @@ class TableOfContents extends \Kitodo\Dlf\Common\AbstractPlugin { // Build menu links based on the $entry['points'] array. if (!empty($entry['points']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($entry['points'])) { - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('page' => $entry['points']), TRUE, FALSE, $this->conf['targetPid']); + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(['page' => $entry['points']], TRUE, FALSE, $this->conf['targetPid']); $entryArray['doNotLinkIt'] = 0; if ($this->conf['basketButton']) { - $entryArray['basketButtonHref'] = ''.$this->pi_getLL('basketButton', '', TRUE).''; + $entryArray['basketButtonHref'] = ''.$this->pi_getLL('basketButton', '', TRUE).''; } } elseif (!empty($entry['points']) && is_string($entry['points'])) { - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['points'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']); + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(['id' => $entry['points'], 'page' => 1], TRUE, FALSE, $this->conf['targetPid']); $entryArray['doNotLinkIt'] = 0; if ($this->conf['basketButton']) { - $entryArray['basketButtonHref'] = ''.$this->pi_getLL('basketButton', '', TRUE).''; + $entryArray['basketButtonHref'] = ''.$this->pi_getLL('basketButton', '', TRUE).''; } } elseif (!empty($entry['targetUid'])) { - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['targetUid'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']); + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(['id' => $entry['targetUid'], 'page' => 1], TRUE, FALSE, $this->conf['targetPid']); $entryArray['doNotLinkIt'] = 0; if ($this->conf['basketButton']) { - $entryArray['basketButtonHref'] = ''.$this->pi_getLL('basketButton', '', TRUE).''; + $entryArray['basketButtonHref'] = ''.$this->pi_getLL('basketButton', '', TRUE).''; } @@ -120,7 +120,7 @@ class TableOfContents extends \Kitodo\Dlf\Common\AbstractPlugin { // 4. Current menu node has no corresponding images if (!empty($this->conf['menuConf.']['expAll']) || $entryArray['ITEM_STATE'] == 'CUR' || is_string($entry['points']) || empty($this->doc->smLinks['l2p'][$entry['id']])) { - $entryArray['_SUB_MENU'] = array (); + $entryArray['_SUB_MENU'] = []; foreach ($entry['children'] as $child) { @@ -176,7 +176,7 @@ class TableOfContents extends \Kitodo\Dlf\Common\AbstractPlugin { // Load template file. $this->getTemplate(); - $TSconfig = array (); + $TSconfig = []; $TSconfig['special'] = 'userfunction'; @@ -212,7 +212,7 @@ class TableOfContents extends \Kitodo\Dlf\Common\AbstractPlugin { if ($this->doc === NULL) { // Quit without doing anything if required variables are not set. - return array (); + return []; } else { @@ -240,7 +240,7 @@ class TableOfContents extends \Kitodo\Dlf\Common\AbstractPlugin { } - $menuArray = array (); + $menuArray = []; // Does the document have physical elements or is it an external file? if ($this->doc->physicalStructure || !\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->doc->uid)) { @@ -297,17 +297,17 @@ class TableOfContents extends \Kitodo\Dlf\Common\AbstractPlugin { $menuArray[0]['ITEM_STATE'] = 'CURIFSUB'; - $menuArray[0]['_SUB_MENU'] = array (); + $menuArray[0]['_SUB_MENU'] = []; while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { - $entry = array ( + $entry = [ 'label' => $resArray['title'], 'type' => $resArray['type'], 'volume' => $resArray['volume'], 'pagination' => '', 'targetUid' => $resArray['uid'] - ); + ]; $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, FALSE); diff --git a/Classes/Plugins/Toolbox.php b/Classes/Plugins/Toolbox.php index 98118c76..ee6a9dc6 100644 --- a/Classes/Plugins/Toolbox.php +++ b/Classes/Plugins/Toolbox.php @@ -48,10 +48,10 @@ class Toolbox extends \Kitodo\Dlf\Common\AbstractPlugin { $this->getTemplate(); // Build data array. - $data = array ( + $data = [ 'conf' => $this->conf, 'piVars' => $this->piVars, - ); + ]; // Get template subpart for tools. $subpart = $this->cObj->getSubpart($this->template, '###TOOLS###'); @@ -67,7 +67,7 @@ class Toolbox extends \Kitodo\Dlf\Common\AbstractPlugin { $cObj->data = $data; - $content .= $this->cObj->substituteMarkerArray($subpart, array ('###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool.'.']))); + $content .= $this->cObj->substituteMarkerArray($subpart, ['###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool.'.'])]); } diff --git a/Classes/Plugins/Tools/ImageDownloadTool.php b/Classes/Plugins/Tools/ImageDownloadTool.php index cfec82c1..e516a81c 100644 --- a/Classes/Plugins/Tools/ImageDownloadTool.php +++ b/Classes/Plugins/Tools/ImageDownloadTool.php @@ -104,7 +104,7 @@ class ImageDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin { */ protected function getImage($page, $label) { - $image = array (); + $image = []; // Get @USE value of METS fileGrp. $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['fileGrpsImageDownload']); @@ -125,11 +125,11 @@ class ImageDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin { break; default: $mimetypeLabel = ''; } - $linkConf = array ( + $linkConf = [ 'parameter' => $image['url'], 'title' => $label.' '.$mimetypeLabel, 'additionalParams' => '', - ); + ]; $imageLink = $this->cObj->typoLink($label.' '.$mimetypeLabel, $linkConf); diff --git a/Classes/Plugins/Tools/PdfDownloadTool.php b/Classes/Plugins/Tools/PdfDownloadTool.php index 192b5796..944e8f84 100644 --- a/Classes/Plugins/Tools/PdfDownloadTool.php +++ b/Classes/Plugins/Tools/PdfDownloadTool.php @@ -133,15 +133,15 @@ class PdfDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin { if (!empty($page1Link)) { if ($this->piVars['double']) { $page1Link = $this->cObj->typoLink($this->pi_getLL('leftPage', ''), - array ('parameter' => $page1Link, 'title' => $this->pi_getLL('leftPage', ''))); + ['parameter' => $page1Link, 'title' => $this->pi_getLL('leftPage', '')]); } else { $page1Link = $this->cObj->typoLink($this->pi_getLL('singlePage', ''), - array ('parameter' => $page1Link, 'title' => $this->pi_getLL('singlePage', ''))); + ['parameter' => $page1Link, 'title' => $this->pi_getLL('singlePage', '')]); } } if (!empty($page2Link)) { $page2Link = $this->cObj->typoLink($this->pi_getLL('rightPage', ''), - array ('parameter' => $page2Link, 'title' => $this->pi_getLL('rightPage', ''))); + ['parameter' => $page2Link, 'title' => $this->pi_getLL('rightPage', '')]); } return $page1Link.$page2Link; @@ -178,7 +178,7 @@ class PdfDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin { // Wrap URLs with HTML. if (!empty($workLink)) { - $workLink = $this->cObj->typoLink($this->pi_getLL('work', ''), array ('parameter' => $workLink, 'title' => $this->pi_getLL('work', ''))); + $workLink = $this->cObj->typoLink($this->pi_getLL('work', ''), ['parameter' => $workLink, 'title' => $this->pi_getLL('work', '')]); } else { diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index f2b9f1eb..08c1f34d 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -18,7 +18,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_audi $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_audioplayer'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_audioplayer', 'dlf_audioplayer'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_audioplayer', 'dlf_audioplayer'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_audioplayer', 'FILE:EXT:'.'dlf/Configuration/Flexforms/AudioPlayer.xml'); @@ -27,7 +27,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_bask $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_basket'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_basket', 'dlf_basket'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_basket', 'dlf_basket'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_basket', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Basket.xml'); @@ -36,7 +36,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_cale $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_calendar'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_calendar', 'dlf_calendar'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_calendar', 'dlf_calendar'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_calendar', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Calendar.xml'); @@ -45,7 +45,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_coll $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_collection'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_collection', 'dlf_collection'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_collection', 'dlf_collection'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_collection', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Collection.xml'); @@ -54,7 +54,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_feed $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_feeds'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_feeds', 'dlf_feeds'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_feeds', 'dlf_feeds'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_feeds', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Feeds.xml'); @@ -63,7 +63,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_list $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_listview'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_listview', 'dlf_listview'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_listview', 'dlf_listview'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_listview', 'FILE:EXT:'.'dlf/Configuration/Flexforms/ListView.xml'); @@ -72,7 +72,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_meta $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_metadata'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_metadata', 'dlf_metadata'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_metadata', 'dlf_metadata'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_metadata', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Metadata.xml'); @@ -81,7 +81,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_navi $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_navigation'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_navigation', 'dlf_navigation'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_navigation', 'dlf_navigation'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_navigation', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Navigation.xml'); @@ -90,7 +90,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_oaip $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_oaipmh'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_oaipmh', 'dlf_oaipmh'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_oaipmh', 'dlf_oaipmh'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_oaipmh', 'FILE:EXT:'.'dlf/Configuration/Flexforms/OaiPmh.xml'); @@ -99,7 +99,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_page $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_pagegrid'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_pagegrid', 'dlf_pagegrid'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_pagegrid', 'dlf_pagegrid'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pagegrid', 'FILE:EXT:'.'dlf/Configuration/Flexforms/PageGrid.xml'); @@ -108,7 +108,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_page $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_pageview'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_pageview', 'dlf_pageview'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_pageview', 'dlf_pageview'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pageview', 'FILE:EXT:'.'dlf/Configuration/Flexforms/PageView.xml'); @@ -117,7 +117,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_sear $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_search'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_search', 'dlf_search'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_search', 'dlf_search'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_search', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Search.xml'); @@ -126,7 +126,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_stat $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_statistics'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_statistics', 'dlf_statistics'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_statistics', 'dlf_statistics'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_statistics', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Statistics.xml'); @@ -135,7 +135,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_tabl $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_tableofcontents'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_tableofcontents', 'dlf_tableofcontents'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_tableofcontents', 'dlf_tableofcontents'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_tableofcontents', 'FILE:EXT:'.'dlf/Configuration/Flexforms/TableOfContents.xml'); @@ -144,7 +144,7 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_tool $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_toolbox'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_toolbox', 'dlf_toolbox'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_toolbox', 'dlf_toolbox'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_toolbox', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Toolbox.xml'); @@ -153,6 +153,6 @@ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_vali $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_validator'] = 'pi_flexform'; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_validator', 'dlf_validator'), 'list_type', 'dlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_validator', 'dlf_validator'], 'list_type', 'dlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_validator', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Validator.xml'); diff --git a/Configuration/TCA/tx_dlf_actionlog.php b/Configuration/TCA/tx_dlf_actionlog.php index d52d810d..51da6de5 100644 --- a/Configuration/TCA/tx_dlf_actionlog.php +++ b/Configuration/TCA/tx_dlf_actionlog.php @@ -9,8 +9,8 @@ * LICENSE.txt file that was distributed with this source code. */ -return array ( - 'ctrl' => array ( +return [ + 'ctrl' => [ 'title' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_actionlog', 'label' => 'label', 'crdate' => 'crdate', @@ -21,66 +21,66 @@ return array ( 'rootLevel' => 0, 'dividers2tabs' => 2, 'searchFields' => 'label,name,crdate', - ), - 'interface' => array ( + ], + 'interface' => [ 'showRecordFieldList' => 'label,name,crdate', 'maxDBListItems' => 25, 'maxSingleDBListItems' => 50, - ), - 'feInterface' => array ( + ], + 'feInterface' => [ 'fe_admin_fieldList' => '', - ), - 'columns' => array ( - 'label' => array ( + ], + 'columns' => [ + 'label' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_actionlog.label', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required,trim', - ), - ), - 'user_id' => array ( + ], + ], + 'user_id' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_actionlog.user_id', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'alphanum,unique', - ), - ), - 'file_name' => array ( + ], + ], + 'file_name' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_actionlog.file_name', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'alphanum,unique', - ), - ), - 'count_pages' => array ( + ], + ], + 'count_pages' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_actionlog.count_pages', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'trim', - ), - ), - 'name' => array ( + ], + ], + 'name' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_actionlog.name', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'trim', - ), - ) - ), - 'types' => array ( - '0' => array ('showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_actionlog.tab1, label;;;;1-1-1, name;;;;2-2-2, file_name;;;;2-2-2, crdate;;;;2-2-2, count_pages;;;;2-2-2'), - ), - 'palettes' => array ( - '1' => array ('showitem' => ''), - ), -); + ], + ] + ], + 'types' => [ + '0' => ['showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_actionlog.tab1, label;;;;1-1-1, name;;;;2-2-2, file_name;;;;2-2-2, crdate;;;;2-2-2, count_pages;;;;2-2-2'], + ], + 'palettes' => [ + '1' => ['showitem' => ''], + ], +]; diff --git a/Configuration/TCA/tx_dlf_basket.php b/Configuration/TCA/tx_dlf_basket.php index 03435c39..7ffedd8c 100644 --- a/Configuration/TCA/tx_dlf_basket.php +++ b/Configuration/TCA/tx_dlf_basket.php @@ -9,8 +9,8 @@ * LICENSE.txt file that was distributed with this source code. */ -return array ( - 'ctrl' => array ( +return [ + 'ctrl' => [ 'title' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_basket', 'label' => 'label', 'tstamp' => 'tstamp', @@ -24,53 +24,53 @@ return array ( 'rootLevel' => 0, 'dividers2tabs' => 2, 'searchFields' => '', - ), - 'interface' => array ( + ], + 'interface' => [ 'showRecordFieldList' => 'label,doc_ids,session_id', - ), - 'feInterface' => array ( + ], + 'feInterface' => [ 'fe_admin_fieldList' => '', - ), - 'columns' => array ( - 'label' => array ( + ], + 'columns' => [ + 'label' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_basket.label', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required,trim', - ), - ), - 'session_id' => array ( + ], + ], + 'session_id' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_basket.sessionId', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'alphanum,unique', - ), - ), - 'doc_ids' => array ( + ], + ], + 'doc_ids' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_basket.docIds', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'alphanum_x', - ), - ), - 'fe_user_id' => array ( + ], + ], + 'fe_user_id' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_basket.feUser', - 'config' => array ( + 'config' => [ 'type' => 'input', 'eval' => 'int,unique', - ), - ), - ), - 'types' => array ( - '0' => array ('showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_basket.tab1, label;;;;1-1-1, session_id;;;;2-2-2, doc_ids;;;;2-2-2, fe_user_id;;;;2-2-2'), - ), - 'palettes' => array ( - '1' => array ('showitem' => ''), - ), -); + ], + ], + ], + 'types' => [ + '0' => ['showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_basket.tab1, label;;;;1-1-1, session_id;;;;2-2-2, doc_ids;;;;2-2-2, fe_user_id;;;;2-2-2'], + ], + 'palettes' => [ + '1' => ['showitem' => ''], + ], +]; diff --git a/Configuration/TCA/tx_dlf_collections.php b/Configuration/TCA/tx_dlf_collections.php index 3e162937..95e1ffe0 100644 --- a/Configuration/TCA/tx_dlf_collections.php +++ b/Configuration/TCA/tx_dlf_collections.php @@ -9,8 +9,8 @@ * LICENSE.txt file that was distributed with this source code. */ -return array ( - 'ctrl' => array ( +return [ + 'ctrl' => [ 'title' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections', 'label' => 'label', 'tstamp' => 'tstamp', @@ -23,177 +23,177 @@ return array ( 'transOrigDiffSourceField' => 'l18n_diffsource', 'default_sortby' => 'ORDER BY label', 'delete' => 'deleted', - 'enablecolumns' => array ( + 'enablecolumns' => [ 'disabled' => 'hidden', 'fe_group' => 'fe_group', - ), + ], 'requestUpdate' => 'sys_language_uid', 'iconfile' => 'EXT:dlf/Resources/Public/Icons/txdlfcollections.png', 'rootLevel' => 0, 'dividers2tabs' => 2, 'searchFields' => 'label,index_name,oai_name,fe_cruser_id', - ), - 'feInterface' => array ( + ], + 'feInterface' => [ 'fe_admin_fieldList' => 'label,description,thumbnail,documents', - ), - 'interface' => array ( + ], + 'interface' => [ 'showRecordFieldList' => 'label,index_name,oai_name,fe_cruser_id', - ), - 'columns' => array ( - 'sys_language_uid' => array ( + ], + 'columns' => [ + 'sys_language_uid' => [ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', 'foreign_table' => 'sys_language', 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => array ( - array ('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1), - array ('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0), - ), + 'items' => [ + ['LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1], + ['LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0], + ], 'default' => 0, - ), - ), - 'l18n_parent' => array ( + ], + ], + 'l18n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', - 'items' => array ( - array ('', 0), - ), + 'items' => [ + ['', 0], + ], 'foreign_table' => 'tx_dlf_collections', 'foreign_table_where' => 'AND tx_dlf_collections.pid=###CURRENT_PID### AND tx_dlf_collections.sys_language_uid IN (-1,0)', - ), - ), - 'l18n_diffsource' => array ( - 'config' => array ( + ], + ], + 'l18n_diffsource' => [ + 'config' => [ 'type' => 'passthrough' - ), - ), - 'hidden' => array ( + ], + ], + 'hidden' => [ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 0, - ), - ), - 'fe_group' => array ( + ], + ], + 'fe_group' => [ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.fe_group', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectMultipleSideBySide', - 'items' => array ( - array ('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1), - array ('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2), - array ('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--'), - ), + 'items' => [ + ['LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1], + ['LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2], + ['LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--'], + ], 'foreign_table' => 'fe_groups', 'size' => 5, 'autoSizeMax' => 15, 'minitems' => 0, 'maxitems' => 20, 'exclusiveKeys' => '-1,-2', - ), - ), - 'label' => array ( + ], + ], + 'label' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.label', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required,trim', - ), - ), - 'index_name' => array ( + ], + ], + 'index_name' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.index_name', - 'config' => array ( + 'config' => [ 'type' => 'none', 'size' => 30, 'max' => 255, 'eval' => 'required,uniqueInPid', - ), - ), - 'index_search' => array ( + ], + ], + 'index_search' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.index_search', - 'config' => array ( + 'config' => [ 'type' => 'text', 'cols' => 30, 'rows' => 5, 'eval' => '', - ), - ), - 'oai_name' => array ( + ], + ], + 'oai_name' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.oai_name', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'nospace,alphanum_x,uniqueInPid', - ), - ), - 'description' => array ( + ], + ], + 'description' => [ 'exclude' => 1, 'l10n_mode' => 'mergeIfNotBlank', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.description', - 'config' => array ( + 'config' => [ 'type' => 'text', 'cols' => 30, 'rows' => 10, 'wrap' => 'virtual', - ), + ], 'defaultExtras' => 'richtext[undo,redo,cut,copy,paste,link,image,line,acronym,chMode,blockstylelabel,formatblock,blockstyle,textstylelabel,textstyle,bold,italic,unorderedlist,orderedlist]:rte_transform[mode=ts_css]', - ), - 'thumbnail' => array ( + ], + 'thumbnail' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.thumbnail', - 'config' => array ( + 'config' => [ 'type' => 'group', 'internal_type' => 'file_reference', 'allowed' => 'gif,jpg,png', 'size' => 1, 'minitems' => 0, 'maxitems' => 1, - ), - ), - 'priority' => array ( + ], + ], + 'priority' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.priority', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', - 'items' => array ( - array ('1', 1), - array ('2', 2), - array ('3', 3), - array ('4', 4), - array ('5', 5), - ), + 'items' => [ + ['1', 1], + ['2', 2], + ['3', 3], + ['4', 4], + ['5', 5], + ], 'size' => 1, 'minitems' => 1, 'maxitems' => 1, 'default' => 3, - ), - ), - 'documents' => array ( + ], + ], + 'documents' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.documents', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingleBox', 'foreign_table' => 'tx_dlf_documents', @@ -203,78 +203,78 @@ return array ( 'minitems' => 0, 'maxitems' => 1048576, 'MM' => 'tx_dlf_relations', - 'MM_match_fields' => array ( + 'MM_match_fields' => [ 'ident' => 'docs_colls', - ), + ], 'MM_opposite_field' => 'collections', - ), - ), - 'owner' => array ( + ], + ], + 'owner' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.owner', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', - 'items' => array ( - array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.owner.none', 0), - ), + 'items' => [ + ['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.owner.none', 0], + ], 'foreign_table' => 'tx_dlf_libraries', 'foreign_table_where' => 'AND tx_dlf_libraries.sys_language_uid IN (-1,0) ORDER BY tx_dlf_libraries.label', 'size' => 1, 'minitems' => 1, 'maxitems' => 1, - ), - ), - 'fe_cruser_id' => array ( + ], + ], + 'fe_cruser_id' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.fe_cruser_id', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', - 'items' => array ( - array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.fe_cruser_id.none', 0), - ), + 'items' => [ + ['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.fe_cruser_id.none', 0], + ], 'foreign_table' => 'fe_users', 'foreign_table_where' => 'ORDER BY fe_users.username', 'size' => 1, 'minitems' => 1, 'maxitems' => 1, - ), - ), - 'fe_admin_lock' => array ( + ], + ], + 'fe_admin_lock' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.fe_admin_lock', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 0, - ), - ), - 'status' => array ( + ], + ], + 'status' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.status', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', - 'items' => array ( - array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.status.default', 0), - ), + 'items' => [ + ['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.status.default', 0], + ], 'size' => 1, 'minitems' => 1, 'maxitems' => 1, 'default' => 0, - ), - ), - ), - 'types' => array ( - '0' => array ('showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.tab1, label,--palette--;;1;;1-1-1, description,--palette--;;2;;2-2-2, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.tab2, sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.tab3, hidden;;;;1-1-1, fe_group;;;;2-2-2, status;;;;3-3-3, owner;;;;4-4-4, fe_cruser_id,--palette--;;3'), - ), - 'palettes' => array ( - '1' => array ('showitem' => 'index_name, --linebreak--, index_search, --linebreak--, oai_name', 'canNotCollapse' => 1), - '2' => array ('showitem' => 'thumbnail, priority', 'canNotCollapse' => 1), - '3' => array ('showitem' => 'fe_admin_lock', 'canNotCollapse' => 1), - ), -); + ], + ], + ], + 'types' => [ + '0' => ['showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.tab1, label,--palette--;;1;;1-1-1, description,--palette--;;2;;2-2-2, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.tab2, sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.tab3, hidden;;;;1-1-1, fe_group;;;;2-2-2, status;;;;3-3-3, owner;;;;4-4-4, fe_cruser_id,--palette--;;3'], + ], + 'palettes' => [ + '1' => ['showitem' => 'index_name, --linebreak--, index_search, --linebreak--, oai_name', 'canNotCollapse' => 1], + '2' => ['showitem' => 'thumbnail, priority', 'canNotCollapse' => 1], + '3' => ['showitem' => 'fe_admin_lock', 'canNotCollapse' => 1], + ], +]; diff --git a/Configuration/TCA/tx_dlf_documents.php b/Configuration/TCA/tx_dlf_documents.php index 1a822c34..3c2cc057 100644 --- a/Configuration/TCA/tx_dlf_documents.php +++ b/Configuration/TCA/tx_dlf_documents.php @@ -9,8 +9,8 @@ * LICENSE.txt file that was distributed with this source code. */ -return array ( - 'ctrl' => array ( +return [ + 'ctrl' => [ 'title' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents', 'label' => 'title', 'tstamp' => 'tstamp', @@ -18,217 +18,217 @@ return array ( 'cruser_id' => 'cruser_id', 'default_sortby' => 'ORDER BY title_sorting', 'delete' => 'deleted', - 'enablecolumns' => array ( + 'enablecolumns' => [ 'disabled' => 'hidden', 'starttime' => 'starttime', 'endtime' => 'endtime', 'fe_group' => 'fe_group', - ), + ], 'iconfile' => 'EXT:dlf/Resources/Public/Icons/txdlfdocuments.png', 'rootLevel' => 0, 'dividers2tabs' => 2, 'searchFields' => 'title,volume,author,year,place,uid,prod_id,location,oai_id,opac_id,union_id,urn', - ), - 'feInterface' => array ( + ], + 'feInterface' => [ 'fe_admin_fieldList' => '', - ), - 'interface' => array ( + ], + 'interface' => [ 'showRecordFieldList' => 'title,volume,author,year,place,uid,prod_id,location,oai_id,opac_id,union_id,urn', 'maxDBListItems' => 25, 'maxSingleDBListItems' => 50, - ), - 'columns' => array ( - 'hidden' => array ( + ], + 'columns' => [ + 'hidden' => [ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 0, - ), - ), - 'starttime' => array ( + ], + ], + 'starttime' => [ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => '13', 'max' => '20', 'eval' => 'datetime', 'default' => '0', - ), - ), - 'endtime' => array ( + ], + ], + 'endtime' => [ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => '13', 'max' => '20', 'eval' => 'datetime', 'default' => '0', - ), - ), - 'fe_group' => array ( + ], + ], + 'fe_group' => [ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.fe_group', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectMultipleSideBySide', - 'items' => array ( - array ('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1), - array ('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2), - array ('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--'), - ), + 'items' => [ + ['LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1], + ['LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2], + ['LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--'], + ], 'foreign_table' => 'fe_groups', 'size' => 5, 'autoSizeMax' => 15, 'minitems' => 0, 'maxitems' => 20, 'exclusiveKeys' => '-1,-2', - ), - ), - 'prod_id' => array ( + ], + ], + 'prod_id' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.prod_id', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'nospace', - ), - ), - 'location' => array ( + ], + ], + 'location' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.location', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 1024, 'eval' => 'required,uniqueInPid', - ), - ), - 'record_id' => array ( + ], + ], + 'record_id' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.record_id', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'nospace,uniqueInPid', - ), - ), - 'opac_id' => array ( + ], + ], + 'opac_id' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.opac_id', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'nospace', - ), - ), - 'union_id' => array ( + ], + ], + 'union_id' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.union_id', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'nospace', - ), - ), - 'urn' => array ( + ], + ], + 'urn' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.urn', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'nospace', - ), - ), - 'purl' => array ( + ], + ], + 'purl' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.purl', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'nospace', - ), - ), - 'title' => array ( + ], + ], + 'title' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.title', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 1024, 'eval' => 'trim', - ), - ), - 'title_sorting' => array ( + ], + ], + 'title_sorting' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.title_sorting', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 1024, 'eval' => 'trim', - ), - ), - 'author' => array ( + ], + ], + 'author' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.author', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'trim', - ), - ), - 'year' => array ( + ], + ], + 'year' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.year', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'trim', - ), - ), - 'place' => array ( + ], + ], + 'place' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.place', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'trim', - ), - ), - 'thumbnail' => array ( + ], + ], + 'thumbnail' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.thumbnail', - 'config' => array ( + 'config' => [ 'type' => 'user', 'userFunc' => 'EXT:dlf/Classes/Hooks/FormEngine.php:FormEngine->displayThumbnail', - ), - ), - 'metadata' => array ( - 'config' => array ( + ], + ], + 'metadata' => [ + 'config' => [ 'type' => 'passthrough', - ), - ), - 'metadata_sorting' => array ( - 'config' => array ( + ], + ], + 'metadata_sorting' => [ + 'config' => [ 'type' => 'passthrough', - ), - ), - 'structure' => array ( + ], + ], + 'structure' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.structure', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', 'foreign_table' => 'tx_dlf_structures', @@ -236,11 +236,11 @@ return array ( 'size' => 1, 'minitems' => 1, 'maxitems' => 1, - ), - ), - 'partof' => array ( + ], + ], + 'partof' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.partof', - 'config' => array ( + 'config' => [ 'type' => 'group', 'internal_type' => 'db', 'allowed' => 'tx_dlf_documents', @@ -252,32 +252,32 @@ return array ( 'disable_controls' => 'browser,delete', 'default' => 0, 'readOnly' => 1, - ), - ), - 'volume' => array ( + ], + ], + 'volume' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.volume', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'trim', - ), - ), - 'volume_sorting' => array ( + ], + ], + 'volume_sorting' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.volume_sorting', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'trim', - ), - ), - 'collections' => array ( + ], + ], + 'collections' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.collections', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectMultipleSideBySide', 'foreign_table' => 'tx_dlf_collections', @@ -287,15 +287,15 @@ return array ( 'minitems' => 1, 'maxitems' => 1024, 'MM' => 'tx_dlf_relations', - 'MM_match_fields' => array ( + 'MM_match_fields' => [ 'ident' => 'docs_colls', - ), - ), - ), - 'owner' => array ( + ], + ], + ], + 'owner' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.owner', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', 'foreign_table' => 'tx_dlf_libraries', @@ -303,35 +303,35 @@ return array ( 'size' => 1, 'minitems' => 0, 'maxitems' => 1, - ), - ), - 'solrcore' => array ( - 'config' => array ( + ], + ], + 'solrcore' => [ + 'config' => [ 'type' => 'passthrough', - ), - ), - 'status' => array ( + ], + ], + 'status' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.status', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', - 'items' => array ( - array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.status.default', 0), - ), + 'items' => [ + ['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.status.default', 0], + ], 'size' => 1, 'minitems' => 1, 'maxitems' => 1, 'default' => 0, - ), - ), - ), - 'types' => array ( - '0' => array ('showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.tab1, title,--palette--;;1;;1-1-1, author, year, place, structure,--palette--;;2;;2-2-2, collections;;;;3-3-3, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.tab2, location;;;;1-1-1, record_id, prod_id;;;;2-2-2, oai_id;;;;3-3-3, opac_id, union_id, urn, purl;;;;4-4-4, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.tab3, hidden,--palette--;;3;;1-1-1, fe_group;;;;2-2-2, status;;;;3-3-3, owner;;;;4-4-4'), - ), - 'palettes' => array ( - '1' => array ('showitem' => 'title_sorting', 'canNotCollapse' => 1), - '2' => array ('showitem' => 'partof, thumbnail, --linebreak--, volume, volume_sorting', 'canNotCollapse' => 1), - '3' => array ('showitem' => 'starttime, endtime', 'canNotCollapse' => 1), - ) -); + ], + ], + ], + 'types' => [ + '0' => ['showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.tab1, title,--palette--;;1;;1-1-1, author, year, place, structure,--palette--;;2;;2-2-2, collections;;;;3-3-3, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.tab2, location;;;;1-1-1, record_id, prod_id;;;;2-2-2, oai_id;;;;3-3-3, opac_id, union_id, urn, purl;;;;4-4-4, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.tab3, hidden,--palette--;;3;;1-1-1, fe_group;;;;2-2-2, status;;;;3-3-3, owner;;;;4-4-4'], + ], + 'palettes' => [ + '1' => ['showitem' => 'title_sorting', 'canNotCollapse' => 1], + '2' => ['showitem' => 'partof, thumbnail, --linebreak--, volume, volume_sorting', 'canNotCollapse' => 1], + '3' => ['showitem' => 'starttime, endtime', 'canNotCollapse' => 1], + ] +]; diff --git a/Configuration/TCA/tx_dlf_formats.php b/Configuration/TCA/tx_dlf_formats.php index c1b267e5..59fff35c 100644 --- a/Configuration/TCA/tx_dlf_formats.php +++ b/Configuration/TCA/tx_dlf_formats.php @@ -9,8 +9,8 @@ * LICENSE.txt file that was distributed with this source code. */ -return array ( - 'ctrl' => array ( +return [ + 'ctrl' => [ 'title' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_formats', 'label' => 'type', 'tstamp' => 'tstamp', @@ -22,55 +22,55 @@ return array ( 'rootLevel' => 1, 'dividers2tabs' => 2, 'searchFields' => 'type,class', - ), - 'feInterface' => array ( + ], + 'feInterface' => [ 'fe_admin_fieldList' => '', - ), - 'interface' => array ( + ], + 'interface' => [ 'showRecordFieldList' => 'type,class', - ), - 'columns' => array ( - 'type' => array ( + ], + 'columns' => [ + 'type' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_formats.type', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required,nospace,alphanum_x,unique', - ), - ), - 'root' => array ( + ], + ], + 'root' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_formats.root', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required,nospace,alphanum_x,unique', - ), - ), - 'namespace' => array ( + ], + ], + 'namespace' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_formats.namespace', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 1024, 'eval' => 'required,nospace,unique', - ), - ), - 'class' => array ( + ], + ], + 'class' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_formats.class', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 1024, 'eval' => 'nospace,alphanum_x,unique', - ), - ), - ), - 'types' => array ( - '0' => array ('showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_formats.tab1, type;;;;1-1-1, root;;;;2-2-2, namespace, class;;;;3-3-3'), - ), - 'palettes' => array ( - '1' => array ('showitem' => ''), - ), -); + ], + ], + ], + 'types' => [ + '0' => ['showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_formats.tab1, type;;;;1-1-1, root;;;;2-2-2, namespace, class;;;;3-3-3'], + ], + 'palettes' => [ + '1' => ['showitem' => ''], + ], +]; diff --git a/Configuration/TCA/tx_dlf_libraries.php b/Configuration/TCA/tx_dlf_libraries.php index 2e8648d3..7c370769 100644 --- a/Configuration/TCA/tx_dlf_libraries.php +++ b/Configuration/TCA/tx_dlf_libraries.php @@ -9,8 +9,8 @@ * LICENSE.txt file that was distributed with this source code. */ -return array ( - 'ctrl' => array ( +return [ + 'ctrl' => [ 'title' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries', 'label' => 'label', 'tstamp' => 'tstamp', @@ -25,92 +25,92 @@ return array ( 'rootLevel' => 0, 'dividers2tabs' => 2, 'searchFields' => 'label,website,contact', - ), - 'feInterface' => array ( + ], + 'feInterface' => [ 'fe_admin_fieldList' => '', - ), - 'interface' => array ( + ], + 'interface' => [ 'showRecordFieldList' => 'label,website,contact', - ), - 'columns' => array ( - 'sys_language_uid' => array ( + ], + 'columns' => [ + 'sys_language_uid' => [ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', 'foreign_table' => 'sys_language', 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => array ( - array ('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1), - array ('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0), - ), + 'items' => [ + ['LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1], + ['LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0], + ], 'default' => 0 - ), - ), - 'l18n_parent' => array ( + ], + ], + 'l18n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', - 'items' => array ( - array ('', 0), - ), + 'items' => [ + ['', 0], + ], 'foreign_table' => 'tx_dlf_libraries', 'foreign_table_where' => 'AND tx_dlf_libraries.pid=###CURRENT_PID### AND tx_dlf_libraries.sys_language_uid IN (-1,0)', - ), - ), - 'l18n_diffsource' => array ( - 'config' => array ( + ], + ], + 'l18n_diffsource' => [ + 'config' => [ 'type' => 'passthrough' - ), - ), - 'label' => array ( + ], + ], + 'label' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.label', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required,trim', - ), - ), - 'index_name' => array ( + ], + ], + 'index_name' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.index_name', - 'config' => array ( + 'config' => [ 'type' => 'none', 'size' => 30, 'max' => 255, 'eval' => 'required,uniqueInPid', - ), - ), - 'website' => array ( + ], + ], + 'website' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.website', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'nospace', - ), - ), - 'contact' => array ( + ], + ], + 'contact' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.contact', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'nospace', - ), - ), - 'image' => array ( + ], + ], + 'image' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.image', - 'config' => array ( + 'config' => [ 'type' => 'group', 'internal_type' => 'file', 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], @@ -120,75 +120,75 @@ return array ( 'size' => 1, 'minitems' => 0, 'maxitems' => 1, - ), - ), - 'oai_label' => array ( + ], + ], + 'oai_label' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.oai_label', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, - ), - ), - 'oai_base' => array ( + ], + ], + 'oai_base' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.oai_base', - 'config' => array ( + 'config' => [ 'type' => 'group', 'internal_type' => 'db', 'allowed' => 'pages', 'size' => 1, 'minitems' => 0, 'maxitems' => 1, - ), - ), - 'opac_label' => array ( + ], + ], + 'opac_label' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.opac_label', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, - ), - ), - 'opac_base' => array ( + ], + ], + 'opac_base' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.opac_base', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'nospace', - ), - ), - 'union_label' => array ( + ], + ], + 'union_label' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.union_label', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, - ), - ), - 'union_base' => array ( + ], + ], + 'union_base' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.union_base', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'nospace', - ), - ), - ), - 'types' => array ( - '0' => array ('showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.tab1, label,--palette--;;1;;1-1-1, website;;;;2-2-2, contact, image;;;;3-3-3, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.tab2, sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.tab3, oai_label,--palette--;;2;;1-1-1, opac_label,--palette--;;3;;2-2-2, union_label,--palette--;;4;;3-3-3'), - ), - 'palettes' => array ( - '1' => array ('showitem' => 'index_name', 'canNotCollapse' => 1), - '2' => array ('showitem' => 'oai_base', 'canNotCollapse' => 1), - '3' => array ('showitem' => 'opac_base', 'canNotCollapse' => 1), - '4' => array ('showitem' => 'union_base', 'canNotCollapse' => 1), - ), -); + ], + ], + ], + 'types' => [ + '0' => ['showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.tab1, label,--palette--;;1;;1-1-1, website;;;;2-2-2, contact, image;;;;3-3-3, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.tab2, sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_libraries.tab3, oai_label,--palette--;;2;;1-1-1, opac_label,--palette--;;3;;2-2-2, union_label,--palette--;;4;;3-3-3'], + ], + 'palettes' => [ + '1' => ['showitem' => 'index_name', 'canNotCollapse' => 1], + '2' => ['showitem' => 'oai_base', 'canNotCollapse' => 1], + '3' => ['showitem' => 'opac_base', 'canNotCollapse' => 1], + '4' => ['showitem' => 'union_base', 'canNotCollapse' => 1], + ], +]; diff --git a/Configuration/TCA/tx_dlf_mail.php b/Configuration/TCA/tx_dlf_mail.php index 845cecb0..039d48e2 100644 --- a/Configuration/TCA/tx_dlf_mail.php +++ b/Configuration/TCA/tx_dlf_mail.php @@ -9,8 +9,8 @@ * LICENSE.txt file that was distributed with this source code. */ -return array ( - 'ctrl' => array ( +return [ + 'ctrl' => [ 'title' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_mail', 'label' => 'label', 'sortby' => 'sorting', @@ -19,46 +19,46 @@ return array ( 'rootLevel' => 0, 'dividers2tabs' => 2, 'searchFields' => 'label,name,mail', - ), - 'interface' => array ( + ], + 'interface' => [ 'showRecordFieldList' => 'label,name,mail', - ), - 'feInterface' => array ( + ], + 'feInterface' => [ 'fe_admin_fieldList' => '', - ), - 'columns' => array ( - 'label' => array ( + ], + 'columns' => [ + 'label' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_mail', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required', - ), - ), - 'name' => array ( + ], + ], + 'name' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_mail.name', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => '', - ), - ), - 'mail' => array ( + ], + ], + 'mail' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_mail.mail', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'unique', - ), - ), - ), - 'types' => array ( - '0' => array ('showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_mail.tab1, label;;;;1-1-1, name;;;;2-2-2, mail;;;;2-2-2'), - ), - 'palettes' => array ( - '1' => array ('showitem' => ''), - ), -); + ], + ], + ], + 'types' => [ + '0' => ['showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_mail.tab1, label;;;;1-1-1, name;;;;2-2-2, mail;;;;2-2-2'], + ], + 'palettes' => [ + '1' => ['showitem' => ''], + ], +]; diff --git a/Configuration/TCA/tx_dlf_metadata.php b/Configuration/TCA/tx_dlf_metadata.php index dcee8f84..970bdb41 100644 --- a/Configuration/TCA/tx_dlf_metadata.php +++ b/Configuration/TCA/tx_dlf_metadata.php @@ -9,8 +9,8 @@ * LICENSE.txt file that was distributed with this source code. */ -return array ( - 'ctrl' => array ( +return [ + 'ctrl' => [ 'title' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata', 'label' => 'label', 'tstamp' => 'tstamp', @@ -21,97 +21,97 @@ return array ( 'transOrigDiffSourceField' => 'l18n_diffsource', 'sortby' => 'sorting', 'delete' => 'deleted', - 'enablecolumns' => array ( + 'enablecolumns' => [ 'disabled' => 'hidden', - ), + ], 'iconfile' => 'EXT:dlf/Resources/Public/Icons/txdlfmetadata.png', 'rootLevel' => 0, 'dividers2tabs' => 2, 'searchFields' => 'label,index_name', - ), - 'feInterface' => array ( + ], + 'feInterface' => [ 'fe_admin_fieldList' => '', - ), - 'interface' => array ( + ], + 'interface' => [ 'showRecordFieldList' => 'label,index_name,is_sortable,is_facet,is_listed,index_autocomplete', - ), - 'columns' => array ( - 'sys_language_uid' => array ( + ], + 'columns' => [ + 'sys_language_uid' => [ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', 'foreign_table' => 'sys_language', 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => array ( - array ('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1), - array ('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0), - ), + 'items' => [ + ['LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1], + ['LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0], + ], 'default' => 0 - ), - ), - 'l18n_parent' => array ( + ], + ], + 'l18n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', - 'items' => array ( - array ('', 0), - ), + 'items' => [ + ['', 0], + ], 'foreign_table' => 'tx_dlf_metadata', 'foreign_table_where' => 'AND tx_dlf_metadata.pid=###CURRENT_PID### AND tx_dlf_metadata.sys_language_uid IN (-1,0) ORDER BY label ASC', - ), - ), - 'l18n_diffsource' => array ( - 'config' => array ( + ], + ], + 'l18n_diffsource' => [ + 'config' => [ 'type' => 'passthrough' - ), - ), - 'hidden' => array ( + ], + ], + 'hidden' => [ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 0, - ), - ), - 'label' => array ( + ], + ], + 'label' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.label', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required,trim', - ), - ), - 'index_name' => array ( + ], + ], + 'index_name' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.index_name', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required,nospace,alphanum_x,uniqueInPid', - ), - ), - 'format' => array ( + ], + ], + 'format' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.format', - 'config' => array ( + 'config' => [ 'type' => 'inline', 'foreign_table' => 'tx_dlf_metadataformat', 'foreign_field' => 'parent_id', 'foreign_unique' => 'encoded', - 'appearance' => array ( + 'appearance' => [ 'expandSingle' => 1, 'levelLinksPosition' => 'bottom', - 'enabledControls' => array ( + 'enabledControls' => [ 'info' => 0, 'new' => 1, 'dragdrop' => 0, @@ -119,130 +119,130 @@ return array ( 'hide' => 0, 'delete' => 1, 'localize' => 0, - ), - ), - ), - ), - 'default_value' => array ( + ], + ], + ], + ], + 'default_value' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.default_value', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 1024, 'eval' => 'trim', - ), - ), - 'wrap' => array ( + ], + ], + 'wrap' => [ 'exclude' => 1, 'l10n_mode' => 'mergeIfNotBlank', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.wrap', - 'config' => array ( + 'config' => [ 'type' => 'text', 'cols' => 48, 'rows' => 20, 'wrap' => 'off', 'eval' => 'trim', 'default' => "key.wrap =
|
\nvalue.required = 1\nvalue.wrap =
|
", - ), + ], 'defaultExtras' => 'nowrap:fixed-font:enable-tab', - ), - 'index_tokenized' => array ( + ], + 'index_tokenized' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.index_tokenized', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 0, - ), - ), - 'index_stored' => array ( + ], + ], + 'index_stored' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.index_stored', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 0, - ), - ), - 'index_indexed' => array ( + ], + ], + 'index_indexed' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.index_indexed', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 1, - ), - ), - 'index_boost' => array ( + ], + ], + 'index_boost' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.index_boost', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 5, 'max' => 64, 'default' => '1.00', 'eval' => 'double2', - ), - ), - 'is_sortable' => array ( + ], + ], + 'is_sortable' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.is_sortable', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 0, - ), - ), - 'is_facet' => array ( + ], + ], + 'is_facet' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.is_facet', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 0, - ), - ), - 'is_listed' => array ( + ], + ], + 'is_listed' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.is_listed', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 0, - ), - ), - 'index_autocomplete' => array ( + ], + ], + 'index_autocomplete' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.index_autocomplete', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 0, - ), - ), - 'status' => array ( + ], + ], + 'status' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.status', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', - 'items' => array ( - array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.status.default', 0), - ), + 'items' => [ + ['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.status.default', 0], + ], 'size' => 1, 'minitems' => 1, 'maxitems' => 1, 'default' => 0, - ), - ), - ), - 'types' => array ( - '0' => array ('showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.tab1, label,--palette--;;1;;1-1-1, format;;;;2-2-2, default_value;;;;3-3-3, wrap, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.tab2, sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.tab3, hidden;;;;1-1-1, status;;;;2-2-2'), - ), - 'palettes' => array ( - '1' => array ('showitem' => 'index_name, --linebreak--, index_tokenized, index_stored, index_indexed, index_boost, --linebreak--, is_sortable, is_facet, is_listed, index_autocomplete', 'canNotCollapse' => 1), - ), -); + ], + ], + ], + 'types' => [ + '0' => ['showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.tab1, label,--palette--;;1;;1-1-1, format;;;;2-2-2, default_value;;;;3-3-3, wrap, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.tab2, sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.tab3, hidden;;;;1-1-1, status;;;;2-2-2'], + ], + 'palettes' => [ + '1' => ['showitem' => 'index_name, --linebreak--, index_tokenized, index_stored, index_indexed, index_boost, --linebreak--, is_sortable, is_facet, is_listed, index_autocomplete', 'canNotCollapse' => 1], + ], +]; diff --git a/Configuration/TCA/tx_dlf_metadataformat.php b/Configuration/TCA/tx_dlf_metadataformat.php index eebee5a6..9b0997be 100644 --- a/Configuration/TCA/tx_dlf_metadataformat.php +++ b/Configuration/TCA/tx_dlf_metadataformat.php @@ -9,8 +9,8 @@ * LICENSE.txt file that was distributed with this source code. */ -return array ( - 'ctrl' => array ( +return [ + 'ctrl' => [ 'title' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadataformat', 'label' => 'encoded', 'tstamp' => 'tstamp', @@ -23,23 +23,23 @@ return array ( 'dividers2tabs' => 2, 'searchFields' => 'encoded', 'hideTable' => 1, - ), - 'feInterface' => array ( + ], + 'feInterface' => [ 'fe_admin_fieldList' => '', - ), - 'interface' => array ( + ], + 'interface' => [ 'showRecordFieldList' => 'parent_id,encoded,xpath,xpath_sorting', - ), - 'columns' => array ( - 'parent_id' => array ( - 'config' => array ( + ], + 'columns' => [ + 'parent_id' => [ + 'config' => [ 'type' => 'passthrough', - ), - ), - 'encoded' => array ( + ], + ], + 'encoded' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadataformat.encoded', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', 'foreign_table' => 'tx_dlf_formats', @@ -47,41 +47,41 @@ return array ( 'size' => 1, 'minitems' => 1, 'maxitems' => 1, - ), - ), - 'xpath' => array ( + ], + ], + 'xpath' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadataformat.xpath', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 1024, 'eval' => 'required,trim', - ), - ), - 'xpath_sorting' => array ( + ], + ], + 'xpath_sorting' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadataformat.xpath_sorting', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 1024, 'eval' => 'trim', - ), - ), - 'mandatory' => array ( + ], + ], + 'mandatory' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadataformat.mandatory', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 0, - ), - ), - ), - 'types' => array ( - '0' => array ('showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadataformat.tab1, encoded;;;;1-1-1, xpath;;;;2-2-2, xpath_sorting, mandatory;;;;3-3-3'), - ), - 'palettes' => array ( - '1' => array ('showitem' => ''), - ), -); + ], + ], + ], + 'types' => [ + '0' => ['showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadataformat.tab1, encoded;;;;1-1-1, xpath;;;;2-2-2, xpath_sorting, mandatory;;;;3-3-3'], + ], + 'palettes' => [ + '1' => ['showitem' => ''], + ], +]; diff --git a/Configuration/TCA/tx_dlf_printer.php b/Configuration/TCA/tx_dlf_printer.php index fc3827d9..e87e9375 100644 --- a/Configuration/TCA/tx_dlf_printer.php +++ b/Configuration/TCA/tx_dlf_printer.php @@ -9,8 +9,8 @@ * LICENSE.txt file that was distributed with this source code. */ -return array ( - 'ctrl' => array ( +return [ + 'ctrl' => [ 'title' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_printer', 'label' => 'label', 'default_sortby' => 'ORDER BY label', @@ -19,37 +19,37 @@ return array ( 'rootLevel' => 0, 'dividers2tabs' => 2, 'searchFields' => 'label,print', - ), - 'interface' => array ( + ], + 'interface' => [ 'showRecordFieldList' => 'label,name,address', - ), - 'feInterface' => array ( + ], + 'feInterface' => [ 'fe_admin_fieldList' => '', - ), - 'columns' => array ( - 'label' => array ( + ], + 'columns' => [ + 'label' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_printer.label', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required,trim', - ), - ), - 'print' => array ( + ], + ], + 'print' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_printer.printcommand', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required', - ), - ), - ), - 'types' => array ( - '0' => array ('showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_printer.tab1, label;;;;1-1-1, print;;;;2-2-2'), - ), - 'palettes' => array ( - '1' => array ('showitem' => ''), - ), -); + ], + ], + ], + 'types' => [ + '0' => ['showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_printer.tab1, label;;;;1-1-1, print;;;;2-2-2'], + ], + 'palettes' => [ + '1' => ['showitem' => ''], + ], +]; diff --git a/Configuration/TCA/tx_dlf_solrcores.php b/Configuration/TCA/tx_dlf_solrcores.php index e770c91f..71fff9f2 100644 --- a/Configuration/TCA/tx_dlf_solrcores.php +++ b/Configuration/TCA/tx_dlf_solrcores.php @@ -9,8 +9,8 @@ * LICENSE.txt file that was distributed with this source code. */ -return array ( - 'ctrl' => array ( +return [ + 'ctrl' => [ 'title' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_solrcores', 'label' => 'label', 'tstamp' => 'tstamp', @@ -22,37 +22,37 @@ return array ( 'rootLevel' => -1, 'dividers2tabs' => 2, 'searchFields' => 'label,index_name', - ), - 'feInterface' => array ( + ], + 'feInterface' => [ 'fe_admin_fieldList' => '', - ), - 'interface' => array ( + ], + 'interface' => [ 'showRecordFieldList' => 'label,index_name', - ), - 'columns' => array ( - 'label' => array ( + ], + 'columns' => [ + 'label' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_solrcores.label', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required,trim', - ), - ), - 'index_name' => array ( + ], + ], + 'index_name' => [ 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_solrcores.index_name', - 'config' => array ( + 'config' => [ 'type' => 'none', 'size' => 30, 'max' => 255, 'eval' => 'alphanum,unique', - ), - ), - ), - 'types' => array ( - '0' => array ('showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_solrcores.tab1, label;;;;1-1-1, index_name;;;;2-2-2'), - ), - 'palettes' => array ( - '1' => array ('showitem' => ''), - ), -); + ], + ], + ], + 'types' => [ + '0' => ['showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_solrcores.tab1, label;;;;1-1-1, index_name;;;;2-2-2'], + ], + 'palettes' => [ + '1' => ['showitem' => ''], + ], +]; diff --git a/Configuration/TCA/tx_dlf_structures.php b/Configuration/TCA/tx_dlf_structures.php index 054f8a4d..c69b458d 100644 --- a/Configuration/TCA/tx_dlf_structures.php +++ b/Configuration/TCA/tx_dlf_structures.php @@ -9,8 +9,8 @@ * LICENSE.txt file that was distributed with this source code. */ -return array ( - 'ctrl' => array ( +return [ + 'ctrl' => [ 'title' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures', 'label' => 'label', 'tstamp' => 'tstamp', @@ -21,144 +21,144 @@ return array ( 'transOrigDiffSourceField' => 'l18n_diffsource', 'default_sortby' => 'ORDER BY label', 'delete' => 'deleted', - 'enablecolumns' => array ( + 'enablecolumns' => [ 'disabled' => 'hidden', - ), + ], 'iconfile' => 'EXT:dlf/Resources/Public/Icons/txdlfstructures.png', 'rootLevel' => 0, 'dividers2tabs' => 2, 'searchFields' => 'label,index_name,oai_name', 'requestUpdate' => 'toplevel', - ), - 'feInterface' => array ( + ], + 'feInterface' => [ 'fe_admin_fieldList' => '', - ), - 'interface' => array ( + ], + 'interface' => [ 'showRecordFieldList' => 'label,index_name,oai_name,toplevel', - ), - 'columns' => array ( - 'sys_language_uid' => array ( + ], + 'columns' => [ + 'sys_language_uid' => [ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', 'foreign_table' => 'sys_language', 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => array ( - array ('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1), - array ('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0), - ), + 'items' => [ + ['LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1], + ['LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0], + ], 'default' => 0 - ), - ), - 'l18n_parent' => array ( + ], + ], + 'l18n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', - 'items' => array ( - array ('', 0), - ), + 'items' => [ + ['', 0], + ], 'foreign_table' => 'tx_dlf_structures', 'foreign_table_where' => 'AND tx_dlf_structures.pid=###CURRENT_PID### AND tx_dlf_structures.sys_language_uid IN (-1,0) ORDER BY label ASC', - ), - ), - 'l18n_diffsource' => array ( - 'config' => array ( + ], + ], + 'l18n_diffsource' => [ + 'config' => [ 'type' => 'passthrough', - ), - ), - 'hidden' => array ( + ], + ], + 'hidden' => [ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 0, - ), - ), - 'toplevel' => array ( + ], + ], + 'toplevel' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.toplevel', - 'config' => array ( + 'config' => [ 'type' => 'check', 'default' => 0, - ), - ), - 'label' => array ( + ], + ], + 'label' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.label', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required,trim', - ), - ), - 'index_name' => array ( + ], + ], + 'index_name' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.index_name', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'required,nospace,alphanum_x,uniqueInPid', - ), - ), - 'oai_name' => array ( + ], + ], + 'oai_name' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.oai_name', - 'config' => array ( + 'config' => [ 'type' => 'input', 'size' => 30, 'max' => 255, 'eval' => 'trim', - ), - ), - 'thumbnail' => array ( + ], + ], + 'thumbnail' => [ 'exclude' => 1, 'l10n_mode' => 'exclude', 'displayCond' => 'FIELD:toplevel:REQ:true', 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.thumbnail', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', - 'items' => array ( - array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.thumbnail.self', 0), - ), + 'items' => [ + ['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.thumbnail.self', 0], + ], 'foreign_table' => 'tx_dlf_structures', 'foreign_table_where' => 'AND tx_dlf_structures.pid=###CURRENT_PID### AND tx_dlf_structures.toplevel=0 AND tx_dlf_structures.sys_language_uid IN (-1,0) ORDER BY tx_dlf_structures.label', 'size' => 1, 'minitems' => 0, 'maxitems' => 1, 'default' => 0, - ), - ), - 'status' => array ( + ], + ], + 'status' => [ 'exclude' => 1, 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.status', - 'config' => array ( + 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', - 'items' => array ( - array ('LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.status.default', 0), - ), + 'items' => [ + ['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.status.default', 0], + ], 'size' => 1, 'minitems' => 1, 'maxitems' => 1, 'default' => 0, - ), - ), - ), - 'types' => array ( - '0' => array ('showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.tab1, toplevel;;;;1-1-1, label,--palette--;;1, thumbnail, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.tab2, sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.tab3, hidden;;;;1-1-1, status;;;;2-2-2'), - ), - 'palettes' => array ( - '1' => array ('showitem' => 'index_name, --linebreak--, oai_name', 'canNotCollapse' => 1), - ), -); + ], + ], + ], + 'types' => [ + '0' => ['showitem' => '--div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.tab1, toplevel;;;;1-1-1, label,--palette--;;1, thumbnail, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.tab2, sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, --div--;LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_structures.tab3, hidden;;;;1-1-1, status;;;;2-2-2'], + ], + 'palettes' => [ + '1' => ['showitem' => 'index_name, --linebreak--, oai_name', 'canNotCollapse' => 1], + ], +]; diff --git a/ext_localconf.php b/ext_localconf.php index 26cb0c42..fe4dfd66 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -67,13 +67,13 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['proc $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 ( +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = [ function () { $SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Kitodo\Dlf\Cli\CommandLineIndexer::class); $SOBE->main(); }, '_CLI_dlf' -); +]; // Register AJAX eID handlers. $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Plugins\Eid\SearchSuggest::class.'::main';