Complex classes like TypoScriptConfiguration often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use TypoScriptConfiguration, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 63 | class TypoScriptConfiguration |
||
| 64 | { |
||
| 65 | /** |
||
| 66 | * @var \ApacheSolrForTypo3\Solr\System\Util\ArrayAccessor|null |
||
| 67 | */ |
||
| 68 | protected $configurationAccess = null; |
||
| 69 | |||
| 70 | /** |
||
| 71 | * Holds the pageId in which context the configuration was parsed |
||
| 72 | * (normally $GLOBALS['TSFE']->id) |
||
| 73 | */ |
||
| 74 | protected $contextPageId = 0; |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @var ContentObjectService |
||
| 78 | */ |
||
| 79 | protected $contentObjectService; |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @param array $configuration |
||
| 83 | * @param int $contextPageId |
||
| 84 | * @param ContentObjectService $contentObjectService |
||
| 85 | */ |
||
| 86 | 215 | public function __construct(array $configuration, $contextPageId = 0, ContentObjectService $contentObjectService = null) |
|
| 92 | |||
| 93 | /** |
||
| 94 | * Checks if a value is 1, '1', 'true' |
||
| 95 | * @param mixed $value |
||
| 96 | * @return bool |
||
| 97 | */ |
||
| 98 | 197 | protected function getBool($value) |
|
| 102 | |||
| 103 | /** |
||
| 104 | * This method can be used to only retrieve array keys where the value is not an array. |
||
| 105 | * |
||
| 106 | * This can be very handy in the configuration when only keys should ne taken into account |
||
| 107 | * where the value is not a subconfiguration (typically an typoscript object path). |
||
| 108 | * |
||
| 109 | * @param $inputArray |
||
| 110 | * @return array |
||
| 111 | */ |
||
| 112 | 7 | protected function getOnlyArrayKeysWhereValueIsNotAnArray($inputArray) |
|
| 127 | |||
| 128 | /** |
||
| 129 | * Gets the value from a given TypoScript path. |
||
| 130 | * |
||
| 131 | * In the context of an frontend content element the path plugin.tx_solr is |
||
| 132 | * merged recursive with overrule with the content element specific typoscript |
||
| 133 | * settings, like plugin.tx_solr_PiResults_Results, and possible flex form settings |
||
| 134 | * (depends on the solr plugin). |
||
| 135 | * |
||
| 136 | * Example: plugin.tx_solr.search.targetPage |
||
| 137 | * returns $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_solr.']['search.']['targetPage'] |
||
| 138 | * |
||
| 139 | * @param string $path TypoScript path |
||
| 140 | * @return array The TypoScript object defined by the given path |
||
| 141 | * @throws InvalidArgumentException |
||
| 142 | */ |
||
| 143 | 234 | public function getValueByPath($path) |
|
| 152 | |||
| 153 | /** |
||
| 154 | * This method can be used to get a configuration value by path if it exists or return a |
||
| 155 | * default value when it does not exist. |
||
| 156 | * |
||
| 157 | * @param string $path |
||
| 158 | * @param mixed $defaultValue |
||
| 159 | * @return mixed |
||
| 160 | */ |
||
| 161 | 233 | public function getValueByPathOrDefaultValue($path, $defaultValue) |
|
| 170 | |||
| 171 | /** |
||
| 172 | * Gets the parent TypoScript Object from a given TypoScript path. |
||
| 173 | * |
||
| 174 | * In the context of an frontend content element the path plugin.tx_solr is |
||
| 175 | * merged recursive with overrule with the content element specific typoscript |
||
| 176 | * settings, like plugin.tx_solr_PiResults_Results, and possible flex form settings |
||
| 177 | * (depends on the solr plugin). |
||
| 178 | * |
||
| 179 | * Example: plugin.tx_solr.index.queue.tt_news.fields.content |
||
| 180 | * returns $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_solr.']['index.']['queue.']['tt_news.']['fields.']['content.'] |
||
| 181 | * which is a SOLR_CONTENT cObj. |
||
| 182 | * |
||
| 183 | * @param string $path TypoScript path |
||
| 184 | * @return array The TypoScript object defined by the given path |
||
| 185 | * @throws InvalidArgumentException |
||
| 186 | */ |
||
| 187 | 122 | public function getObjectByPath($path) |
|
| 200 | |||
| 201 | /** |
||
| 202 | * Gets the parent TypoScript Object from a given TypoScript path and if not present return |
||
| 203 | * the default value |
||
| 204 | * |
||
| 205 | * @see getObjectByPath |
||
| 206 | * @param string $path |
||
| 207 | * @param array $defaultValue |
||
| 208 | * @return array |
||
| 209 | */ |
||
| 210 | 114 | public function getObjectByPathOrDefault($path, array $defaultValue) |
|
| 224 | |||
| 225 | /** |
||
| 226 | * Checks whether a given TypoScript path is valid. |
||
| 227 | * |
||
| 228 | * @param string $path TypoScript path |
||
| 229 | * @return bool TRUE if the path resolves, FALSE otherwise |
||
| 230 | */ |
||
| 231 | public function isValidPath($path) |
||
| 242 | |||
| 243 | /** |
||
| 244 | * Merges a configuration with another configuration a |
||
| 245 | * |
||
| 246 | * @param array $configurationToMerge |
||
| 247 | * @param bool $addKeys If set to FALSE, keys that are NOT found in $original will not be set. Thus only existing value can/will be overruled from overrule array. |
||
| 248 | * @param bool $includeEmptyValues If set, values from $overrule will overrule if they are empty or zero. |
||
| 249 | * @param bool $enableUnsetFeature If set, special values "__UNSET" can be used in the overrule array in order to unset array keys in the original array. |
||
| 250 | * @return TypoScriptConfiguration |
||
| 251 | */ |
||
| 252 | 27 | public function mergeSolrConfiguration(array $configurationToMerge, $addKeys = true, $includeEmptyValues = true, $enableUnsetFeature = true) |
|
| 267 | |||
| 268 | /** |
||
| 269 | * Returns true when ext_solr is enabled |
||
| 270 | * |
||
| 271 | * @param boolean $defaultIfEmpty |
||
| 272 | * @return boolean |
||
| 273 | */ |
||
| 274 | 3 | public function getEnabled($defaultIfEmpty = false) |
|
| 280 | |||
| 281 | /** |
||
| 282 | * Returns the configured css file for a specific fileKey. |
||
| 283 | * |
||
| 284 | * plugin.tx_solr.cssFiles.<fileKey> |
||
| 285 | * |
||
| 286 | * @param string $fileKey |
||
| 287 | * @param string $defaultIfEmpty |
||
| 288 | * @return string |
||
| 289 | */ |
||
| 290 | 25 | public function getCssFileByFileKey($fileKey, $defaultIfEmpty = '') |
|
| 295 | |||
| 296 | /** |
||
| 297 | * Returns the configured additionalFields configured for the indexing. |
||
| 298 | * |
||
| 299 | * plugin.tx_solr.index.additionalFields. |
||
| 300 | * |
||
| 301 | * @param array $defaultIfEmpty |
||
| 302 | * @return array |
||
| 303 | */ |
||
| 304 | 3 | public function getIndexAdditionalFieldsConfiguration($defaultIfEmpty = []) |
|
| 309 | |||
| 310 | /** |
||
| 311 | * Returns all solr fields names where a mapping is configured in index.additionalFields |
||
| 312 | * |
||
| 313 | * Returns all keys from |
||
| 314 | * plugin.tx_solr.index.additionalFields. |
||
| 315 | * |
||
| 316 | * @param array $defaultIfEmpty |
||
| 317 | * @return array |
||
| 318 | */ |
||
| 319 | 2 | public function getIndexMappedAdditionalFieldNames($defaultIfEmpty = []) |
|
| 325 | |||
| 326 | /** |
||
| 327 | * Returns the fieldProcessingInstructions configuration array |
||
| 328 | * |
||
| 329 | * plugin.tx_solr.index.fieldProcessingInstructions. |
||
| 330 | * |
||
| 331 | * @param array $defaultIfEmpty |
||
| 332 | * @return array |
||
| 333 | */ |
||
| 334 | 51 | public function getIndexFieldProcessingInstructionsConfiguration(array $defaultIfEmpty = []) |
|
| 339 | |||
| 340 | /** |
||
| 341 | * Retrieves the indexing configuration array for an indexing queue by configuration name. |
||
| 342 | * |
||
| 343 | * plugin.tx_solr.index.queue.<configurationName>. |
||
| 344 | * |
||
| 345 | * @param string $configurationName |
||
| 346 | * @param array $defaultIfEmpty |
||
| 347 | * @return array |
||
| 348 | */ |
||
| 349 | 5 | public function getIndexQueueConfigurationByName($configurationName, array $defaultIfEmpty = []) |
|
| 355 | |||
| 356 | /** |
||
| 357 | * Returns an array of all allowedPageTypes. |
||
| 358 | * |
||
| 359 | * plugin.tx_solr.index.queue.pages.allowedPageTypes |
||
| 360 | * |
||
| 361 | * @param string $configurationName The configuration name of the queue to use. |
||
| 362 | * @param array $defaultIfEmpty |
||
| 363 | * @return array |
||
| 364 | */ |
||
| 365 | 28 | public function getIndexQueueAllowedPageTypesArrayByConfigurationName($configurationName = 'pages', $defaultIfEmpty = []) |
|
| 375 | |||
| 376 | /** |
||
| 377 | * Returns an array of all allowedPageTypes. |
||
| 378 | * |
||
| 379 | * plugin.tx_solr.index.queue.pages.allowedPageTypes |
||
| 380 | * |
||
| 381 | * @deprecated since 6.0 will be removed in 7.0 |
||
| 382 | * |
||
| 383 | * @param array $defaultIfEmpty |
||
| 384 | * @return array |
||
| 385 | */ |
||
| 386 | 1 | public function getIndexQueuePagesAllowedPageTypesArray($defaultIfEmpty = []) |
|
| 393 | |||
| 394 | /** |
||
| 395 | * Returns the configured excludeContentByClass patterns as array. |
||
| 396 | * |
||
| 397 | * plugin.tx_solr.index.queue.pages.excludeContentByClass |
||
| 398 | * |
||
| 399 | * @param array $defaultIfEmpty |
||
| 400 | * @return array |
||
| 401 | */ |
||
| 402 | 36 | public function getIndexQueuePagesExcludeContentByClassArray($defaultIfEmpty = []) |
|
| 403 | { |
||
| 404 | 36 | $path = 'plugin.tx_solr.index.queue.pages.excludeContentByClass'; |
|
| 405 | 36 | $result = $this->getValueByPathOrDefaultValue($path, ''); |
|
| 406 | |||
| 407 | 36 | if (trim($result) == '') { |
|
| 408 | 6 | return $defaultIfEmpty; |
|
| 409 | } |
||
| 410 | |||
| 411 | 30 | return GeneralUtility::trimExplode(',', $result); |
|
| 412 | } |
||
| 413 | |||
| 414 | /** |
||
| 415 | * Returns the configured database table for an indexing queue configuration or |
||
| 416 | * the configurationName itself that is used by convention as tableName when no |
||
| 417 | * other tablename is present. |
||
| 418 | * |
||
| 419 | * plugin.tx_solr.index.queue.<configurationName>.table or configurationName |
||
| 420 | * |
||
| 421 | * @param string $configurationName |
||
| 422 | * @return string |
||
| 423 | */ |
||
| 424 | 36 | public function getIndexQueueTableNameOrFallbackToConfigurationName($configurationName = '') |
|
| 430 | |||
| 431 | /** |
||
| 432 | * Returns the field configuration for a specific index queue. |
||
| 433 | * |
||
| 434 | * plugin.tx_solr.index.queue.<configurationName>.fields. |
||
| 435 | * |
||
| 436 | * @param string $configurationName |
||
| 437 | * @param array $defaultIfEmpty |
||
| 438 | * @return array |
||
| 439 | */ |
||
| 440 | 17 | public function getIndexQueueFieldsConfigurationByConfigurationName($configurationName = '', $defaultIfEmpty = []) |
|
| 446 | |||
| 447 | /** |
||
| 448 | * Gets an array of tables configured for indexing by the Index Queue. Since the |
||
| 449 | * record monitor must watch these tables for manipulation. |
||
| 450 | * |
||
| 451 | * @return array Array of table names to be watched by the record monitor. |
||
| 452 | */ |
||
| 453 | 29 | public function getIndexQueueMonitoredTables() |
|
| 469 | |||
| 470 | /** |
||
| 471 | * This method can be used to check if a table is configured to be monitored by the record monitor. |
||
| 472 | * |
||
| 473 | * @param string $tableName |
||
| 474 | * @return bool |
||
| 475 | */ |
||
| 476 | 28 | public function getIndexQueueIsMonitoredTable($tableName) |
|
| 480 | |||
| 481 | /** |
||
| 482 | * Returns the configured indexer class that should be used for a certain indexingConfiguration. |
||
| 483 | * By default "ApacheSolrForTypo3\Solr\IndexQueue\Indexer" will be returned. |
||
| 484 | * |
||
| 485 | * plugin.tx_solr.index.queue.<configurationName>.indexer |
||
| 486 | * |
||
| 487 | * @param string $configurationName |
||
| 488 | * @param string $defaultIfEmpty |
||
| 489 | * @return string |
||
| 490 | */ |
||
| 491 | 6 | public function getIndexQueueIndexerByConfigurationName($configurationName, $defaultIfEmpty = Indexer::class) |
|
| 497 | |||
| 498 | /** |
||
| 499 | * Returns the configuration of an indexer for a special indexingConfiguration. By default an empty |
||
| 500 | * array is returned. |
||
| 501 | * |
||
| 502 | * plugin.tx_solr.index.queue.<configurationName>.indexer. |
||
| 503 | * |
||
| 504 | * @param string $configurationName |
||
| 505 | * @param array $defaultIfEmpty |
||
| 506 | * @return array |
||
| 507 | */ |
||
| 508 | 6 | public function getIndexQueueIndexerConfigurationByConfigurationName($configurationName, $defaultIfEmpty = []) |
|
| 514 | |||
| 515 | /** |
||
| 516 | * Returns all solr fields names where a mapping configuration is set for a certain index configuration |
||
| 517 | * |
||
| 518 | * Returns all keys from |
||
| 519 | * plugin.tx_solr.index.queue.<configurationName>.fields. |
||
| 520 | * |
||
| 521 | * @param string $configurationName |
||
| 522 | * @param array $defaultIfEmpty |
||
| 523 | * @return array |
||
| 524 | */ |
||
| 525 | 6 | public function getIndexQueueMappedFieldsByConfigurationName($configurationName = '', $defaultIfEmpty = []) |
|
| 531 | |||
| 532 | /** |
||
| 533 | * This method is used to check if an index queue configuration is enabled or not |
||
| 534 | * |
||
| 535 | * plugin.tx_solr.index.queue.<configurationName> = 1 |
||
| 536 | * |
||
| 537 | * @param string $configurationName |
||
| 538 | * @param bool $defaultIfEmpty |
||
| 539 | * @return bool |
||
| 540 | */ |
||
| 541 | 24 | public function getIndexQueueConfigurationIsEnabled($configurationName, $defaultIfEmpty = false) |
|
| 547 | |||
| 548 | /** |
||
| 549 | * Retrieves an array of enabled index queue configurations. |
||
| 550 | * |
||
| 551 | * plugin.tx_solr.index.queue.<configurationName> |
||
| 552 | * |
||
| 553 | * @param array $defaultIfEmpty |
||
| 554 | * @return array |
||
| 555 | */ |
||
| 556 | 31 | public function getEnabledIndexQueueConfigurationNames($defaultIfEmpty = []) |
|
| 569 | |||
| 570 | /** |
||
| 571 | * Retrieves an array of additional fields that will trigger an recursive update of pages |
||
| 572 | * when some of the fields on that page are modified. |
||
| 573 | * |
||
| 574 | * plugin.tx_solr.index.queue.recursiveUpdateFields |
||
| 575 | * |
||
| 576 | * @param string $configurationName |
||
| 577 | * @param array $defaultIfEmpty |
||
| 578 | * @return array |
||
| 579 | */ |
||
| 580 | 23 | public function getIndexQueueConfigurationRecursiveUpdateFields($configurationName, $defaultIfEmpty = []) |
|
| 591 | |||
| 592 | |||
| 593 | /** |
||
| 594 | * Retrieves and initialPagesAdditionalWhereClause where clause when configured or an empty string. |
||
| 595 | * |
||
| 596 | * plugin.tx_solr.index.queue.pages.initialPagesAdditionalWhereClause |
||
| 597 | * |
||
| 598 | * @param string $defaultIfEmpty |
||
| 599 | * |
||
| 600 | * @return string |
||
| 601 | * |
||
| 602 | */ |
||
| 603 | 8 | public function getInitialPagesAdditionalWhereClause($defaultIfEmpty = ' AND 1=1') |
|
| 614 | |||
| 615 | /** |
||
| 616 | * Retrieves and additional where clause when configured or an empty string. |
||
| 617 | * |
||
| 618 | * plugin.tx_solr.index.queue.<configurationName>.additionalWhereClause |
||
| 619 | * |
||
| 620 | * @param string $configurationName |
||
| 621 | * @return string |
||
| 622 | */ |
||
| 623 | 42 | public function getIndexQueueAdditionalWhereClauseByConfigurationName($configurationName) |
|
| 634 | |||
| 635 | /** |
||
| 636 | * This method can be used to retrieve all index queue configuration names, where |
||
| 637 | * a certain table is used. It can be configured with the property "table" or is using the configuration |
||
| 638 | * key a fallback for the table name. |
||
| 639 | * |
||
| 640 | * plugin.tx_solr.index.queue.<configurationName>. |
||
| 641 | * |
||
| 642 | * @param string $tableName |
||
| 643 | * @param array $defaultIfEmpty |
||
| 644 | * @return array |
||
| 645 | */ |
||
| 646 | 10 | public function getIndexQueueConfigurationNamesByTableName($tableName, $defaultIfEmpty = []) |
|
| 669 | |||
| 670 | /** |
||
| 671 | * This method is used to retrieve the className of a queue initializer for a certain indexing configuration |
||
| 672 | * of returns the default initializer class, when noting is configured. |
||
| 673 | * |
||
| 674 | * plugin.tx_solr.index.queue.<configurationName>.initialization |
||
| 675 | * |
||
| 676 | * @param string $configurationName |
||
| 677 | * @param string $defaultIfEmpty |
||
| 678 | * @return mixed |
||
| 679 | */ |
||
| 680 | 5 | public function getIndexQueueInitializerClassByConfigurationName($configurationName, $defaultIfEmpty = Record::class) |
|
| 687 | |||
| 688 | /** |
||
| 689 | * Returns the configured javascript file for a specific fileKey. |
||
| 690 | * |
||
| 691 | * plugin.tx_solr.javascriptFiles.<fileKey> |
||
| 692 | * |
||
| 693 | * @param string $fileKey |
||
| 694 | * @param string $defaultIfEmpty |
||
| 695 | * @return string |
||
| 696 | */ |
||
| 697 | 26 | public function getJavaScriptFileByFileKey($fileKey, $defaultIfEmpty = '') |
|
| 702 | |||
| 703 | /** |
||
| 704 | * Returns the configuration where to load the javascript |
||
| 705 | * |
||
| 706 | * plugin.tx_solr.javascriptFiles.loadIn |
||
| 707 | * |
||
| 708 | * @param string $defaultIfEmpty |
||
| 709 | * @return string |
||
| 710 | */ |
||
| 711 | 25 | public function getJavaScriptLoadIn($defaultIfEmpty = 'footer') |
|
| 716 | |||
| 717 | /** |
||
| 718 | * Returns the _LOCAL_LANG configuration from the TypoScript. |
||
| 719 | * |
||
| 720 | * plugin.tx_solr._LOCAL_LANG. |
||
| 721 | * |
||
| 722 | * @param array $defaultIfEmpty |
||
| 723 | * @return array |
||
| 724 | */ |
||
| 725 | 25 | public function getLocalLangConfiguration(array $defaultIfEmpty = []) |
|
| 730 | |||
| 731 | /** |
||
| 732 | * When this is enabled the output of the devlog, will be printed as debug output. |
||
| 733 | * |
||
| 734 | * @param bool $defaultIfEmpty |
||
| 735 | * @return bool |
||
| 736 | */ |
||
| 737 | public function getLoggingDebugOutputDevlog($defaultIfEmpty = false) |
||
| 742 | |||
| 743 | /** |
||
| 744 | * Returns if query filters should be written to the log. |
||
| 745 | * |
||
| 746 | * plugin.tx_solr.logging.query.filters |
||
| 747 | * |
||
| 748 | * @param bool $defaultIfEmpty |
||
| 749 | * @return bool |
||
| 750 | */ |
||
| 751 | 36 | public function getLoggingQueryFilters($defaultIfEmpty = false) |
|
| 756 | |||
| 757 | /** |
||
| 758 | * Returns if the querystring should be logged or not. |
||
| 759 | * |
||
| 760 | * plugin.tx_solr.logging.query.queryString |
||
| 761 | * |
||
| 762 | * @param bool $defaultIfEmpty |
||
| 763 | * @return bool |
||
| 764 | */ |
||
| 765 | 25 | public function getLoggingQueryQueryString($defaultIfEmpty = false) |
|
| 770 | |||
| 771 | /** |
||
| 772 | * Returns if the searchWords should be logged or not. |
||
| 773 | * |
||
| 774 | * plugin.tx_solr.logging.query.searchWords |
||
| 775 | * |
||
| 776 | * @param bool $defaultIfEmpty |
||
| 777 | * @return bool |
||
| 778 | */ |
||
| 779 | 24 | public function getLoggingQuerySearchWords($defaultIfEmpty = false) |
|
| 784 | |||
| 785 | /** |
||
| 786 | * Returns if the rawGet requests should be logged or not. |
||
| 787 | * |
||
| 788 | * plugin.tx_solr.logging.query.rawGet |
||
| 789 | * |
||
| 790 | * @param bool $defaultIfEmpty |
||
| 791 | * @return bool |
||
| 792 | */ |
||
| 793 | 35 | public function getLoggingQueryRawGet($defaultIfEmpty = false) |
|
| 798 | |||
| 799 | /** |
||
| 800 | * Returns if the rawPost requests should be logged or not. |
||
| 801 | * |
||
| 802 | * plugin.tx_solr.logging.query.rawPost |
||
| 803 | * |
||
| 804 | * @param bool $defaultIfEmpty |
||
| 805 | * @return bool |
||
| 806 | */ |
||
| 807 | 57 | public function getLoggingQueryRawPost($defaultIfEmpty = false) |
|
| 812 | |||
| 813 | /** |
||
| 814 | * Returns if the rawDelete requests should be logged or not. |
||
| 815 | * |
||
| 816 | * plugin.tx_solr.logging.query.rawDelete |
||
| 817 | * |
||
| 818 | * @param bool $defaultIfEmpty |
||
| 819 | * @return bool |
||
| 820 | */ |
||
| 821 | 2 | public function getLoggingQueryRawDelete($defaultIfEmpty = false) |
|
| 826 | |||
| 827 | /** |
||
| 828 | * Returns if exceptions should be logged or not. |
||
| 829 | * |
||
| 830 | * plugin.tx_solr.logging.exceptions |
||
| 831 | * |
||
| 832 | * @param bool $defaultIfEmpty |
||
| 833 | * @return bool |
||
| 834 | */ |
||
| 835 | 1 | public function getLoggingExceptions($defaultIfEmpty = true) |
|
| 840 | |||
| 841 | /** |
||
| 842 | * Returns if indexing operations should be logged or not. |
||
| 843 | * |
||
| 844 | * plugin.tx_solr.logging.indexing |
||
| 845 | * |
||
| 846 | * @param bool $defaultIfEmpty |
||
| 847 | * @return bool |
||
| 848 | */ |
||
| 849 | 54 | public function getLoggingIndexing($defaultIfEmpty = false) |
|
| 854 | |||
| 855 | /** |
||
| 856 | * Returns if indexing queue operations should be logged or not. |
||
| 857 | * |
||
| 858 | * plugin.tx_solr.logging.indexing.queue |
||
| 859 | * |
||
| 860 | * @param bool $defaultIfEmpty |
||
| 861 | * @return bool |
||
| 862 | */ |
||
| 863 | 12 | public function getLoggingIndexingQueue($defaultIfEmpty = false) |
|
| 868 | |||
| 869 | /** |
||
| 870 | * This method can be used to check if the logging during indexing should be done. |
||
| 871 | * It takes the specific configuration by indexQueueConfiguration into account or is using the |
||
| 872 | * fallback when the logging is enabled on queue or indexing level. |
||
| 873 | * |
||
| 874 | * plugin.tx_solr.logging.indexing.queue.<indexQueueConfiguration> |
||
| 875 | * |
||
| 876 | * @param string $indexQueueConfiguration |
||
| 877 | * @param bool $defaultIfEmpty |
||
| 878 | * @return bool |
||
| 879 | */ |
||
| 880 | 13 | public function getLoggingIndexingQueueOperationsByConfigurationNameWithFallBack($indexQueueConfiguration, $defaultIfEmpty = false) |
|
| 896 | |||
| 897 | /** |
||
| 898 | * Returns if a log message should be written when a page was indexed. |
||
| 899 | * |
||
| 900 | * plugin.tx_solr.logging.indexing.pageIndexed |
||
| 901 | |||
| 902 | * @param bool $defaultIfEmpty |
||
| 903 | * @return bool |
||
| 904 | */ |
||
| 905 | 5 | public function getLoggingIndexingPageIndexed($defaultIfEmpty = false) |
|
| 910 | |||
| 911 | /** |
||
| 912 | * Returns if a log message should be written when the TYPO3 search markers are missing in the page. |
||
| 913 | * |
||
| 914 | * plugin.tx_solr.logging.indexing.missingTypo3SearchMarkers |
||
| 915 | |||
| 916 | * @param bool $defaultIfEmpty |
||
| 917 | * @return bool |
||
| 918 | */ |
||
| 919 | 6 | public function getLoggingIndexingMissingTypo3SearchMarkers($defaultIfEmpty = true) |
|
| 924 | |||
| 925 | /** |
||
| 926 | * Returns if the initialization of an indexqueue should be logged. |
||
| 927 | * |
||
| 928 | * plugin.tx_solr.logging.indexing.indexQueueInitialization |
||
| 929 | * |
||
| 930 | * @param bool $defaultIfEmpty |
||
| 931 | * @return bool |
||
| 932 | */ |
||
| 933 | 7 | public function getLoggingIndexingIndexQueueInitialization($defaultIfEmpty = false) |
|
| 938 | |||
| 939 | /** |
||
| 940 | * Indicates if the debug mode is enabled or not. |
||
| 941 | * |
||
| 942 | * plugin.tx_solr.enableDebugMode |
||
| 943 | |||
| 944 | * @param bool $defaultIfEmpty |
||
| 945 | * @return bool |
||
| 946 | */ |
||
| 947 | 24 | public function getEnabledDebugMode($defaultIfEmpty = false) |
|
| 952 | |||
| 953 | /** |
||
| 954 | * Returns true or false if something is configured below plugin.tx_solr.solr. |
||
| 955 | * |
||
| 956 | * plugin.tx_solr.solr. |
||
| 957 | * |
||
| 958 | * @param boolean $defaultIfEmpty |
||
| 959 | * @return boolean |
||
| 960 | */ |
||
| 961 | 3 | public function getSolrHasConnectionConfiguration($defaultIfEmpty = false) |
|
| 966 | |||
| 967 | /** |
||
| 968 | * Returns the defaultTimeout used for requests to the Solr server |
||
| 969 | * |
||
| 970 | * plugin.tx_solr.solr.timeout |
||
| 971 | * |
||
| 972 | * @param float $defaultIfEmpty |
||
| 973 | * @return float |
||
| 974 | */ |
||
| 975 | 74 | public function getSolrTimeout($defaultIfEmpty = 0.0) |
|
| 979 | |||
| 980 | /** |
||
| 981 | * Returns the scheme used for requests to the Solr server |
||
| 982 | * |
||
| 983 | * plugin.tx_solr.solr.scheme |
||
| 984 | * |
||
| 985 | * Applies stdWrap on the configured setting |
||
| 986 | * |
||
| 987 | * @param string $defaultIfEmpty |
||
| 988 | * @return string |
||
| 989 | */ |
||
| 990 | 4 | public function getSolrScheme($defaultIfEmpty = 'http') |
|
| 996 | |||
| 997 | /** |
||
| 998 | * Returns the hostname used for requests to the Solr server |
||
| 999 | * |
||
| 1000 | * plugin.tx_solr.solr.host |
||
| 1001 | * |
||
| 1002 | * Applies stdWrap on the configured setting |
||
| 1003 | * |
||
| 1004 | * @param string $defaultIfEmpty |
||
| 1005 | * @return string |
||
| 1006 | */ |
||
| 1007 | 7 | public function getSolrHost($defaultIfEmpty = 'localhost') |
|
| 1013 | |||
| 1014 | /** |
||
| 1015 | * Returns the port used for requests to the Solr server |
||
| 1016 | * |
||
| 1017 | * plugin.tx_solr.solr.port |
||
| 1018 | * |
||
| 1019 | * Applies stdWrap on the configured setting |
||
| 1020 | * |
||
| 1021 | * @param int $defaultIfEmpty |
||
| 1022 | * @return int |
||
| 1023 | */ |
||
| 1024 | 4 | public function getSolrPort($defaultIfEmpty = 8983) |
|
| 1030 | |||
| 1031 | /** |
||
| 1032 | * Returns the path used for requests to the Solr server |
||
| 1033 | * |
||
| 1034 | * plugin.tx_solr.solr.path |
||
| 1035 | * |
||
| 1036 | * Applies stdWrap on the configured setting |
||
| 1037 | * |
||
| 1038 | * @param string $defaultIfEmpty |
||
| 1039 | * @return string |
||
| 1040 | */ |
||
| 1041 | 7 | public function getSolrPath($defaultIfEmpty = '/solr/core_en/') |
|
| 1052 | |||
| 1053 | /** |
||
| 1054 | * Returns the username used for requests to the Solr server |
||
| 1055 | * |
||
| 1056 | * plugin.tx_solr.solr.username |
||
| 1057 | * |
||
| 1058 | * Applies stdWrap on the configured setting |
||
| 1059 | * |
||
| 1060 | * @param string $defaultIfEmpty |
||
| 1061 | * @return string |
||
| 1062 | */ |
||
| 1063 | 4 | public function getSolrUsername($defaultIfEmpty = '') |
|
| 1069 | |||
| 1070 | /** |
||
| 1071 | * Returns the password used for requests to the Solr server |
||
| 1072 | * |
||
| 1073 | * plugin.tx_solr.solr.password |
||
| 1074 | * |
||
| 1075 | * Applies stdWrap on the configured setting |
||
| 1076 | * |
||
| 1077 | * @param string $defaultIfEmpty |
||
| 1078 | * @return string |
||
| 1079 | */ |
||
| 1080 | 4 | public function getSolrPassword($defaultIfEmpty = '') |
|
| 1086 | |||
| 1087 | /** |
||
| 1088 | * Retrieves the complete search configuration |
||
| 1089 | * |
||
| 1090 | * plugin.tx_solr.search. |
||
| 1091 | * |
||
| 1092 | * @param array $defaultIfEmpty |
||
| 1093 | * @return array |
||
| 1094 | */ |
||
| 1095 | 24 | public function getSearchConfiguration(array $defaultIfEmpty = []) |
|
| 1100 | |||
| 1101 | /** |
||
| 1102 | * Indicates if elevation should be used or not |
||
| 1103 | * |
||
| 1104 | * plugin.tx_solr.search.elevation |
||
| 1105 | * |
||
| 1106 | * @param bool $defaultIfEmpty |
||
| 1107 | * @return bool |
||
| 1108 | */ |
||
| 1109 | 24 | public function getSearchElevation($defaultIfEmpty = false) |
|
| 1114 | |||
| 1115 | /** |
||
| 1116 | * Indicates if elevated results should be marked |
||
| 1117 | * |
||
| 1118 | * plugin.tx_solr.search.elevation.markElevatedResults |
||
| 1119 | * |
||
| 1120 | * @param bool $defaultIfEmpty |
||
| 1121 | * @return bool |
||
| 1122 | */ |
||
| 1123 | 24 | public function getSearchElevationMarkElevatedResults($defaultIfEmpty = true) |
|
| 1128 | |||
| 1129 | /** |
||
| 1130 | * Indicates if elevation should be forced |
||
| 1131 | * |
||
| 1132 | *plugin.tx_solr.search.elevation.forceElevation |
||
| 1133 | * |
||
| 1134 | * @param bool $defaultIfEmpty |
||
| 1135 | * @return bool |
||
| 1136 | */ |
||
| 1137 | 24 | public function getSearchElevationForceElevation($defaultIfEmpty = true) |
|
| 1142 | |||
| 1143 | /** |
||
| 1144 | * Indicates if collapsing on a certain field should be used to build variants or not. |
||
| 1145 | * |
||
| 1146 | * plugin.tx_solr.search.variants |
||
| 1147 | * |
||
| 1148 | * @param bool $defaultIfEmpty |
||
| 1149 | * @return bool |
||
| 1150 | */ |
||
| 1151 | 128 | public function getSearchVariants($defaultIfEmpty = false) |
|
| 1156 | |||
| 1157 | /** |
||
| 1158 | * Indicates if collapsing on a certain field should be used or not |
||
| 1159 | * |
||
| 1160 | * plugin.tx_solr.search.variants.variantField |
||
| 1161 | * |
||
| 1162 | * @param string $defaultIfEmpty |
||
| 1163 | * @return string |
||
| 1164 | */ |
||
| 1165 | 3 | public function getSearchVariantsField($defaultIfEmpty = 'variantId') |
|
| 1169 | |||
| 1170 | /** |
||
| 1171 | * Indicates if expanding of collapsed items it activated. |
||
| 1172 | * |
||
| 1173 | * plugin.tx_solr.search.variants.expand |
||
| 1174 | * |
||
| 1175 | * @param bool $defaultIfEmpty |
||
| 1176 | * @return bool |
||
| 1177 | */ |
||
| 1178 | 4 | public function getSearchVariantsExpand($defaultIfEmpty = false) |
|
| 1183 | |||
| 1184 | /** |
||
| 1185 | * Retrieves the number of elements that should be expanded. |
||
| 1186 | * |
||
| 1187 | * plugin.tx_solr.search.variants.limit |
||
| 1188 | * |
||
| 1189 | * @param int $defaultIfEmpty |
||
| 1190 | * @return int |
||
| 1191 | */ |
||
| 1192 | 2 | public function getSearchVariantsLimit($defaultIfEmpty = 10) |
|
| 1197 | |||
| 1198 | /** |
||
| 1199 | * Indicates if frequent searches should be show or not. |
||
| 1200 | * |
||
| 1201 | * plugin.tx_solr.search.frequentSearches |
||
| 1202 | * |
||
| 1203 | * @param bool $defaultIfEmpty |
||
| 1204 | * @return bool |
||
| 1205 | */ |
||
| 1206 | 23 | public function getSearchFrequentSearches($defaultIfEmpty = false) |
|
| 1211 | |||
| 1212 | /** |
||
| 1213 | * Returns the sub configuration of the frequentSearches |
||
| 1214 | * |
||
| 1215 | * plugin.tx_solr.search.frequentSearches. |
||
| 1216 | * |
||
| 1217 | * @param array $defaultIfEmpty |
||
| 1218 | * @return array |
||
| 1219 | */ |
||
| 1220 | 23 | public function getSearchFrequentSearchesConfiguration($defaultIfEmpty = []) |
|
| 1225 | |||
| 1226 | /** |
||
| 1227 | * Retrieves the minimum font size that should be used for the frequentSearches. |
||
| 1228 | * |
||
| 1229 | * plugin.tx_solr.search.frequentSearches.minSize |
||
| 1230 | * |
||
| 1231 | * @param int $defaultIfEmpty |
||
| 1232 | * @return int |
||
| 1233 | */ |
||
| 1234 | public function getSearchFrequentSearchesMinSize($defaultIfEmpty = 14) |
||
| 1239 | |||
| 1240 | /** |
||
| 1241 | * Retrieves the maximum font size that should be used for the frequentSearches. |
||
| 1242 | * |
||
| 1243 | * plugin.tx_solr.search.frequentSearches.minSize |
||
| 1244 | * |
||
| 1245 | * @param int $defaultIfEmpty |
||
| 1246 | * @return int |
||
| 1247 | */ |
||
| 1248 | public function getSearchFrequentSearchesMaxSize($defaultIfEmpty = 32) |
||
| 1253 | |||
| 1254 | /** |
||
| 1255 | * Indicates if frequent searches should be show or not. |
||
| 1256 | * |
||
| 1257 | * plugin.tx_solr.search.frequentSearches.useLowercaseKeywords |
||
| 1258 | * |
||
| 1259 | * @param bool $defaultIfEmpty |
||
| 1260 | * @return bool |
||
| 1261 | */ |
||
| 1262 | 18 | public function getSearchFrequentSearchesUseLowercaseKeywords($defaultIfEmpty = false) |
|
| 1267 | |||
| 1268 | /** |
||
| 1269 | * Returns the configuration if the search should be initialized with an empty query. |
||
| 1270 | * |
||
| 1271 | * plugin.tx_solr.search.initializeWithEmptyQuery |
||
| 1272 | * |
||
| 1273 | * @param bool $defaultIfEmpty |
||
| 1274 | * @return bool |
||
| 1275 | */ |
||
| 1276 | 26 | public function getSearchInitializeWithEmptyQuery($defaultIfEmpty = false) |
|
| 1281 | |||
| 1282 | /** |
||
| 1283 | * Returns the configured initial query |
||
| 1284 | * |
||
| 1285 | * plugin.tx_solr.search.initializeWithQuery |
||
| 1286 | * |
||
| 1287 | * @param string $defaultIfEmpty |
||
| 1288 | * @return string |
||
| 1289 | */ |
||
| 1290 | 26 | public function getSearchInitializeWithQuery($defaultIfEmpty = '') |
|
| 1295 | |||
| 1296 | /** |
||
| 1297 | * Returns if the last searches should be displayed or not. |
||
| 1298 | * |
||
| 1299 | * plugin.tx_solr.search.lastSearches |
||
| 1300 | * |
||
| 1301 | * @param bool $defaultIfEmpty |
||
| 1302 | * @return bool |
||
| 1303 | */ |
||
| 1304 | 23 | public function getSearchLastSearches($defaultIfEmpty = false) |
|
| 1309 | |||
| 1310 | /** |
||
| 1311 | * Returns the lastSearch mode. "user" for user specific |
||
| 1312 | * |
||
| 1313 | * plugin.tx_solr.search.lastSearches.mode |
||
| 1314 | * |
||
| 1315 | * @param string $defaultIfEmpty |
||
| 1316 | * @return string |
||
| 1317 | */ |
||
| 1318 | 23 | public function getSearchLastSearchesMode($defaultIfEmpty = 'user') |
|
| 1323 | |||
| 1324 | /** |
||
| 1325 | * Returns the lastSearch limit |
||
| 1326 | * |
||
| 1327 | * plugin.tx_solr.search.lastSearches.limit |
||
| 1328 | * |
||
| 1329 | * @param int $defaultIfEmpty |
||
| 1330 | * @return int |
||
| 1331 | */ |
||
| 1332 | 23 | public function getSearchLastSearchesLimit($defaultIfEmpty = 10) |
|
| 1337 | |||
| 1338 | /** |
||
| 1339 | * Returns the search results fieldProcessingInstructions configuration array |
||
| 1340 | * |
||
| 1341 | * plugin.tx_solr.search.results.fieldProcessingInstructions. |
||
| 1342 | * |
||
| 1343 | * @param array $defaultIfEmpty |
||
| 1344 | * @return array |
||
| 1345 | */ |
||
| 1346 | 18 | public function getSearchResultsFieldProcessingInstructionsConfiguration(array $defaultIfEmpty = []) |
|
| 1351 | |||
| 1352 | /** |
||
| 1353 | * Returns the search results fieldRenderingInstructions configuration array |
||
| 1354 | * |
||
| 1355 | * plugin.tx_solr.search.results.fieldRenderingInstructions. |
||
| 1356 | * |
||
| 1357 | * @param array $defaultIfEmpty |
||
| 1358 | * @return array |
||
| 1359 | */ |
||
| 1360 | 18 | public function getSearchResultsFieldRenderingInstructionsConfiguration(array $defaultIfEmpty = []) |
|
| 1365 | |||
| 1366 | /** |
||
| 1367 | * Indicates if the results of an initial empty query should be shown or not. |
||
| 1368 | * |
||
| 1369 | * plugin.tx_solr.search.showResultsOfInitialEmptyQuery |
||
| 1370 | * |
||
| 1371 | * @param bool $defaultIfEmpty |
||
| 1372 | * @return bool |
||
| 1373 | */ |
||
| 1374 | 4 | public function getSearchShowResultsOfInitialEmptyQuery($defaultIfEmpty = false) |
|
| 1379 | |||
| 1380 | /** |
||
| 1381 | * Indicates if the results of an initial search query should be shown. |
||
| 1382 | * |
||
| 1383 | * plugin.tx_solr.search.showResultsOfInitialQuery |
||
| 1384 | * |
||
| 1385 | * @param bool $defaultIfEmpty |
||
| 1386 | * @return bool |
||
| 1387 | */ |
||
| 1388 | 4 | public function getSearchShowResultsOfInitialQuery($defaultIfEmpty = false) |
|
| 1393 | |||
| 1394 | /** |
||
| 1395 | * Indicates if sorting was enabled or not. |
||
| 1396 | * |
||
| 1397 | * plugin.tx_solr.search.sorting |
||
| 1398 | * |
||
| 1399 | * @param bool $defaultIfEmpty |
||
| 1400 | * @return bool |
||
| 1401 | */ |
||
| 1402 | 17 | public function getSearchSorting($defaultIfEmpty = false) |
|
| 1407 | |||
| 1408 | /** |
||
| 1409 | * Returns the sorting options configurations. |
||
| 1410 | * |
||
| 1411 | * plugin.tx_solr.search.sorting.options. |
||
| 1412 | * |
||
| 1413 | * @param array $defaultIfEmpty |
||
| 1414 | * @return array |
||
| 1415 | */ |
||
| 1416 | 17 | public function getSearchSortingOptionsConfiguration($defaultIfEmpty = []) |
|
| 1421 | |||
| 1422 | /** |
||
| 1423 | * Retrieves the sorting default order for a sort option. |
||
| 1424 | * |
||
| 1425 | * plugin.tx_solr.search.sorting.options.<sortOptionName>.defaultOrder |
||
| 1426 | * |
||
| 1427 | * or |
||
| 1428 | * |
||
| 1429 | * plugin.tx_solr.search.sorting.defaultOrder |
||
| 1430 | * |
||
| 1431 | * |
||
| 1432 | * @param string $sortOptionName |
||
| 1433 | * @param string $defaultIfEmpty |
||
| 1434 | * @return string |
||
| 1435 | */ |
||
| 1436 | 17 | public function getSearchSortingDefaultOrderBySortOptionName($sortOptionName = '', $defaultIfEmpty = 'asc') |
|
| 1451 | |||
| 1452 | /** |
||
| 1453 | * Returns the configured fixedOrder, if nothing configured defaultIfEmpty will be returned. |
||
| 1454 | * |
||
| 1455 | * plugin.tx_solr.search.sorting.options.<sortOptionName>.fixedOrder |
||
| 1456 | * |
||
| 1457 | * @param string $sortOptionName |
||
| 1458 | * @param string $defaultIfEmpty |
||
| 1459 | * @return string |
||
| 1460 | */ |
||
| 1461 | 17 | public function getSearchSortingFixedOrderBySortOptionName($sortOptionName = '', $defaultIfEmpty = '') |
|
| 1466 | |||
| 1467 | /** |
||
| 1468 | * Returns the trusted fields configured for the search that do not need to be escaped. |
||
| 1469 | * |
||
| 1470 | * @param array $defaultIfEmpty |
||
| 1471 | * @return array |
||
| 1472 | */ |
||
| 1473 | 18 | public function getSearchTrustedFieldsArray($defaultIfEmpty = ['url']) |
|
| 1483 | |||
| 1484 | /** |
||
| 1485 | * Indicates if the plugin arguments should be kept in the search form for a second submission. |
||
| 1486 | * |
||
| 1487 | * plugin.tx_solr.search.keepExistingParametersForNewSearches |
||
| 1488 | * |
||
| 1489 | * @param bool $defaultIfEmpty |
||
| 1490 | * @return bool |
||
| 1491 | */ |
||
| 1492 | 23 | public function getSearchKeepExistingParametersForNewSearches($defaultIfEmpty = false) |
|
| 1497 | |||
| 1498 | /** |
||
| 1499 | * Returns if an empty query is allowed on the query level. |
||
| 1500 | * |
||
| 1501 | * plugin.tx_solr.search.query.allowEmptyQuery |
||
| 1502 | * |
||
| 1503 | * @param string $defaultIfEmpty |
||
| 1504 | * @return string |
||
| 1505 | */ |
||
| 1506 | 26 | public function getSearchQueryAllowEmptyQuery($defaultIfEmpty = '') |
|
| 1511 | |||
| 1512 | /** |
||
| 1513 | * Returns the fieldProcessingInstructions configuration array |
||
| 1514 | * |
||
| 1515 | * plugin.tx_solr.search.query.filter. |
||
| 1516 | * |
||
| 1517 | * @param array $defaultIfEmpty |
||
| 1518 | * @return array |
||
| 1519 | */ |
||
| 1520 | 32 | public function getSearchQueryFilterConfiguration(array $defaultIfEmpty = []) |
|
| 1525 | |||
| 1526 | /** |
||
| 1527 | * Can be used to overwrite the filterConfiguration. |
||
| 1528 | * |
||
| 1529 | * plugin.tx_solr.search.query.filter. |
||
| 1530 | * |
||
| 1531 | * @param array $configuration |
||
| 1532 | */ |
||
| 1533 | 1 | public function setSearchQueryFilterConfiguration(array $configuration) |
|
| 1537 | |||
| 1538 | /** |
||
| 1539 | * Removes the pageSections filter setting. |
||
| 1540 | * |
||
| 1541 | * @return void |
||
| 1542 | */ |
||
| 1543 | 2 | public function removeSearchQueryFilterForPageSections() |
|
| 1547 | |||
| 1548 | /** |
||
| 1549 | * Returns the configured queryFields from TypoScript |
||
| 1550 | * |
||
| 1551 | * plugin.tx_solr.search.query.queryFields |
||
| 1552 | * |
||
| 1553 | * @param string $defaultIfEmpty |
||
| 1554 | * @return string |
||
| 1555 | */ |
||
| 1556 | 129 | public function getSearchQueryQueryFields($defaultIfEmpty = '') |
|
| 1560 | |||
| 1561 | /** |
||
| 1562 | * Returns the configured returnFields as array. |
||
| 1563 | * |
||
| 1564 | * plugin.tx_solr.search.query.returnFields |
||
| 1565 | * |
||
| 1566 | * @param array $defaultIfEmpty |
||
| 1567 | * @return array |
||
| 1568 | */ |
||
| 1569 | 129 | public function getSearchQueryReturnFieldsAsArray($defaultIfEmpty = []) |
|
| 1577 | |||
| 1578 | /** |
||
| 1579 | * Returns the configured target page for the search. |
||
| 1580 | * By default the contextPageId will be used |
||
| 1581 | * |
||
| 1582 | * plugin.tx_solr.search.targetPage |
||
| 1583 | * |
||
| 1584 | * @return int |
||
| 1585 | */ |
||
| 1586 | 134 | public function getSearchTargetPage() |
|
| 1596 | |||
| 1597 | /** |
||
| 1598 | * Retrieves the targetPage configuration. |
||
| 1599 | * |
||
| 1600 | * plugin.tx_solr.search.targetPage. |
||
| 1601 | * |
||
| 1602 | * @param array $defaultIfEmpty |
||
| 1603 | * @return array |
||
| 1604 | */ |
||
| 1605 | 28 | public function getSearchTargetPageConfiguration(array $defaultIfEmpty = []) |
|
| 1610 | |||
| 1611 | /** |
||
| 1612 | * Retrieves the pagebrowser configuration. |
||
| 1613 | * |
||
| 1614 | * plugin.tx_solr.search.results.pagebrowser. |
||
| 1615 | * |
||
| 1616 | * @param array $defaultIfEmpty |
||
| 1617 | * @return array |
||
| 1618 | */ |
||
| 1619 | 18 | public function getSearchResultsPageBrowserConfiguration(array $defaultIfEmpty = []) |
|
| 1624 | |||
| 1625 | /** |
||
| 1626 | * Returns the result highlighting fields. |
||
| 1627 | * |
||
| 1628 | * plugin.tx_solr.search.results.resultsHighlighting.highlightFields |
||
| 1629 | * |
||
| 1630 | * @param string $defaultIfEmpty |
||
| 1631 | * @return string |
||
| 1632 | */ |
||
| 1633 | 31 | public function getSearchResultsHighlightingFields($defaultIfEmpty = '') |
|
| 1637 | |||
| 1638 | /** |
||
| 1639 | * Returns the result highlighting fields as array. |
||
| 1640 | * |
||
| 1641 | * plugin.tx_solr.search.results.resultsHighlighting.highlightFields |
||
| 1642 | * |
||
| 1643 | * @param array $defaultIfEmpty |
||
| 1644 | * @return array |
||
| 1645 | */ |
||
| 1646 | 18 | public function getSearchResultsHighlightingFieldsAsArray($defaultIfEmpty = []) |
|
| 1656 | |||
| 1657 | /** |
||
| 1658 | * Returns the fragmentSeparator for highlighted segments. |
||
| 1659 | * |
||
| 1660 | * plugin.tx_solr.search.results.resultsHighlighting.fragmentSeparator |
||
| 1661 | * |
||
| 1662 | * @param string $defaultIfEmpty |
||
| 1663 | * @return string |
||
| 1664 | */ |
||
| 1665 | 18 | public function getSearchResultsHighlightingFragmentSeparator($defaultIfEmpty = '[...]') |
|
| 1669 | |||
| 1670 | /** |
||
| 1671 | * Returns the number of results that should be shown per page. |
||
| 1672 | * |
||
| 1673 | * plugin.tx_solr.search.results.resultsPerPage |
||
| 1674 | * |
||
| 1675 | * @param int $defaultIfEmpty |
||
| 1676 | * @return int |
||
| 1677 | */ |
||
| 1678 | 24 | public function getSearchResultsPerPage($defaultIfEmpty = 10) |
|
| 1682 | |||
| 1683 | /** |
||
| 1684 | * Returns the available options for the per page switch. |
||
| 1685 | * |
||
| 1686 | * plugin.tx_solr.search.results.resultsPerPageSwitchOptions |
||
| 1687 | * |
||
| 1688 | * @param array $defaultIfEmpty |
||
| 1689 | * @return array |
||
| 1690 | */ |
||
| 1691 | 24 | public function getSearchResultsPerPageSwitchOptionsAsArray($defaultIfEmpty = []) |
|
| 1701 | |||
| 1702 | /** |
||
| 1703 | * Returns the configured wrap for the resultHighlighting. |
||
| 1704 | * |
||
| 1705 | * plugin.tx_solr.search.results.resultsHighlighting.wrap |
||
| 1706 | * |
||
| 1707 | * @param string $defaultIfEmpty |
||
| 1708 | * @return string |
||
| 1709 | */ |
||
| 1710 | 31 | public function getSearchResultsHighlightingWrap($defaultIfEmpty = '') |
|
| 1714 | |||
| 1715 | /** |
||
| 1716 | * Indicates if spellchecking is enabled or not. |
||
| 1717 | * |
||
| 1718 | * plugin.tx_solr.search.spellchecking |
||
| 1719 | * |
||
| 1720 | * @param bool $defaultIfEmpty |
||
| 1721 | * @return bool |
||
| 1722 | */ |
||
| 1723 | 25 | public function getSearchSpellchecking($defaultIfEmpty = false) |
|
| 1728 | |||
| 1729 | /** |
||
| 1730 | * Returns the wrap that should be used for spellchecking |
||
| 1731 | * |
||
| 1732 | * plugin.tx_solr.search.spellchecking.wrap |
||
| 1733 | * |
||
| 1734 | * @param string $defaultIfEmpty |
||
| 1735 | * @return string |
||
| 1736 | */ |
||
| 1737 | 5 | public function getSearchSpellcheckingWrap($defaultIfEmpty = '') |
|
| 1741 | |||
| 1742 | /** |
||
| 1743 | * Returns the numberOfSuggestionsToTry that should be used for the spellchecking. |
||
| 1744 | * |
||
| 1745 | * plugin.tx_solr.search.spellchecking.numberOfSuggestionsToTry |
||
| 1746 | * |
||
| 1747 | * @param int $defaultIfEmpty |
||
| 1748 | * @return int |
||
| 1749 | */ |
||
| 1750 | 22 | public function getSearchSpellcheckingNumberOfSuggestionsToTry($defaultIfEmpty = 0) |
|
| 1754 | |||
| 1755 | /** |
||
| 1756 | * Indicates if a second search should be fired from the spellchecking suggestion if no results could be found. |
||
| 1757 | * |
||
| 1758 | * plugin.tx_solr.search.spellchecking.searchUsingSpellCheckerSuggestion |
||
| 1759 | * |
||
| 1760 | * @param bool $defaultIfEmpty |
||
| 1761 | * @return bool |
||
| 1762 | */ |
||
| 1763 | 3 | public function getSearchSpellcheckingSearchUsingSpellCheckerSuggestion($defaultIfEmpty = false) |
|
| 1768 | |||
| 1769 | /** |
||
| 1770 | * Indicates if faceting is enabled or not. |
||
| 1771 | * |
||
| 1772 | * plugin.tx_solr.search.faceting |
||
| 1773 | * |
||
| 1774 | * @param bool $defaultIfEmpty |
||
| 1775 | * @return bool |
||
| 1776 | */ |
||
| 1777 | 20 | public function getSearchFaceting($defaultIfEmpty = false) |
|
| 1782 | |||
| 1783 | /** |
||
| 1784 | * Retrieves the facetLinkATagParams for a facet by facet name. If nothing specific is configured |
||
| 1785 | * the global facetLinkATagParams with be returned. |
||
| 1786 | * |
||
| 1787 | * plugin.tx_solr.search.faceting.facets.<facetName>.facetLinkATagParams |
||
| 1788 | * |
||
| 1789 | * or |
||
| 1790 | * |
||
| 1791 | * plugin.tx_solr.search.faceting.facetLinkATagParams |
||
| 1792 | * |
||
| 1793 | * |
||
| 1794 | * @param string $facetName |
||
| 1795 | * @param string $defaultIfEmpty |
||
| 1796 | * @return string |
||
| 1797 | */ |
||
| 1798 | 19 | public function getSearchFacetingFacetLinkATagParamsByName($facetName = '', $defaultIfEmpty = '') |
|
| 1813 | |||
| 1814 | /** |
||
| 1815 | * Returns the test that should be used to remove a faceting link |
||
| 1816 | * |
||
| 1817 | * plugin.tx_solr.search.faceting.removeFacetLinkText |
||
| 1818 | * |
||
| 1819 | * @param string $defaultIfEmpty |
||
| 1820 | * @return string |
||
| 1821 | */ |
||
| 1822 | 1 | public function getSearchFacetingRemoveFacetLinkText($defaultIfEmpty = '@facetLabel: @facetText') |
|
| 1826 | |||
| 1827 | /** |
||
| 1828 | * Retrieves the showEvenWhenEmpty for a facet by facet name. If nothing specific is configured |
||
| 1829 | * the global showEmptyFacets with be returned. |
||
| 1830 | * |
||
| 1831 | * plugin.tx_solr.search.faceting.facets.<facetName>.showEvenWhenEmpty |
||
| 1832 | * |
||
| 1833 | * or |
||
| 1834 | * |
||
| 1835 | * plugin.tx_solr.search.faceting.showEmptyFacets |
||
| 1836 | * |
||
| 1837 | * |
||
| 1838 | * @param string $facetName |
||
| 1839 | * @param bool $defaultIfEmpty |
||
| 1840 | * @return bool |
||
| 1841 | */ |
||
| 1842 | 19 | public function getSearchFacetingShowEmptyFacetsByName($facetName = '', $defaultIfEmpty = false) |
|
| 1857 | |||
| 1858 | /** |
||
| 1859 | * Returns the wrap for the faceting show all link |
||
| 1860 | * |
||
| 1861 | * plugin.tx_solr.search.faceting.showAllLink.wrap |
||
| 1862 | * |
||
| 1863 | * @param string $defaultIfEmpty |
||
| 1864 | * @return string |
||
| 1865 | */ |
||
| 1866 | public function getSearchFacetingShowAllLinkWrap($defaultIfEmpty = '') |
||
| 1870 | |||
| 1871 | /** |
||
| 1872 | * Returns the link url parameters that should be added to a facet. |
||
| 1873 | * |
||
| 1874 | * plugin.tx_solr.search.faceting.facetLinkUrlParameters |
||
| 1875 | * |
||
| 1876 | * @param string $defaultIfEmpty |
||
| 1877 | * @return string |
||
| 1878 | */ |
||
| 1879 | 18 | public function getSearchFacetingFacetLinkUrlParameters($defaultIfEmpty = '') |
|
| 1885 | |||
| 1886 | /** |
||
| 1887 | * Returns if the facetLinkUrlsParameters should be included in the reset link. |
||
| 1888 | * |
||
| 1889 | * plugin.tx_solr.search.faceting.facetLinkUrlParameters.useForFacetResetLinkUrl |
||
| 1890 | * |
||
| 1891 | * @param bool $defaultIfEmpty |
||
| 1892 | * @return bool |
||
| 1893 | */ |
||
| 1894 | 18 | public function getSearchFacetingFacetLinkUrlParametersUseForFacetResetLinkUrl($defaultIfEmpty = true) |
|
| 1899 | |||
| 1900 | /** |
||
| 1901 | * Returns the link url parameters that should be added to a facet as array. |
||
| 1902 | * |
||
| 1903 | * plugin.tx_solr.search.faceting.facetLinkUrlParameters |
||
| 1904 | * |
||
| 1905 | * @param array $defaultIfEmpty |
||
| 1906 | * @return array |
||
| 1907 | */ |
||
| 1908 | 18 | public function getSearchFacetingFacetLinkUrlParametersAsArray($defaultIfEmpty = []) |
|
| 1917 | |||
| 1918 | /** |
||
| 1919 | * Return the configured minimumCount value for facets. |
||
| 1920 | * |
||
| 1921 | * plugin.tx_solr.search.faceting.minimumCount |
||
| 1922 | * |
||
| 1923 | * @param int $defaultIfEmpty |
||
| 1924 | * @return int |
||
| 1925 | */ |
||
| 1926 | 31 | public function getSearchFacetingMinimumCount($defaultIfEmpty = 1) |
|
| 1930 | |||
| 1931 | /** |
||
| 1932 | * Return the configured limit value for facets, used for displaying. |
||
| 1933 | * |
||
| 1934 | * plugin.tx_solr.search.faceting.limit |
||
| 1935 | * |
||
| 1936 | * @param int $defaultIfEmpty |
||
| 1937 | * @return int |
||
| 1938 | */ |
||
| 1939 | 18 | public function getSearchFacetingLimit($defaultIfEmpty = 10) |
|
| 1943 | |||
| 1944 | /** |
||
| 1945 | * Return the configured limit value for facets, used for the response. |
||
| 1946 | * |
||
| 1947 | * plugin.tx_solr.search.faceting.facetLimit |
||
| 1948 | * |
||
| 1949 | * @param int $defaultIfEmpty |
||
| 1950 | * @return int |
||
| 1951 | */ |
||
| 1952 | 31 | public function getSearchFacetingFacetLimit($defaultIfEmpty = 100) |
|
| 1956 | |||
| 1957 | /** |
||
| 1958 | * Returns if the singleFacetMode is active or not. |
||
| 1959 | * |
||
| 1960 | * plugin.tx_solr.search.faceting.singleFacetMode |
||
| 1961 | * |
||
| 1962 | * @param bool $defaultIfEmpty |
||
| 1963 | * @return bool |
||
| 1964 | */ |
||
| 1965 | 1 | public function getSearchFacetingSingleFacetMode($defaultIfEmpty = false) |
|
| 1970 | |||
| 1971 | /** |
||
| 1972 | * Return the configured faceting sortBy value. |
||
| 1973 | * |
||
| 1974 | * plugin.tx_solr.search.faceting.sortBy |
||
| 1975 | * |
||
| 1976 | * @param string $defaultIfEmpty |
||
| 1977 | * @return string |
||
| 1978 | */ |
||
| 1979 | 31 | public function getSearchFacetingSortBy($defaultIfEmpty = '') |
|
| 1983 | |||
| 1984 | /** |
||
| 1985 | * Returns if a facets should be kept on selection. Global faceting setting |
||
| 1986 | * can also be configured on facet level by using |
||
| 1987 | * (plugin.tx_solr.search.faceting.facets.<fieldName>.keepAllOptionsOnSelection) |
||
| 1988 | * |
||
| 1989 | * plugin.tx_solr.search.faceting.keepAllFacetsOnSelection |
||
| 1990 | * |
||
| 1991 | * @param bool $defaultIfEmpty |
||
| 1992 | * @return bool |
||
| 1993 | */ |
||
| 1994 | 27 | public function getSearchFacetingKeepAllFacetsOnSelection($defaultIfEmpty = false) |
|
| 1999 | |||
| 2000 | /** |
||
| 2001 | * Returns the configured faceting configuration. |
||
| 2002 | * |
||
| 2003 | * plugin.tx_solr.search.faceting.facets |
||
| 2004 | * |
||
| 2005 | * @param array $defaultIfEmpty |
||
| 2006 | * @return array |
||
| 2007 | */ |
||
| 2008 | 27 | public function getSearchFacetingFacets(array $defaultIfEmpty = []) |
|
| 2012 | |||
| 2013 | /** |
||
| 2014 | * Returns the configuration of a single facet by facet name. |
||
| 2015 | * |
||
| 2016 | * plugin.tx_solr.search.faceting.facets.<facetName> |
||
| 2017 | * |
||
| 2018 | * @param string $facetName |
||
| 2019 | * @param array $defaultIfEmpty |
||
| 2020 | * @return array |
||
| 2021 | */ |
||
| 2022 | 18 | public function getSearchFacetingFacetByName($facetName, $defaultIfEmpty = []) |
|
| 2026 | |||
| 2027 | /** |
||
| 2028 | * Indicates if statistics is enabled or not. |
||
| 2029 | * |
||
| 2030 | * plugin.tx_solr.statistics |
||
| 2031 | * |
||
| 2032 | * @param bool $defaultIfEmpty |
||
| 2033 | * @return bool |
||
| 2034 | */ |
||
| 2035 | 24 | public function getStatistics($defaultIfEmpty = false) |
|
| 2040 | |||
| 2041 | /** |
||
| 2042 | * Indicates to which length an ip should be anonymized in the statistics |
||
| 2043 | * |
||
| 2044 | * plugin.tx_solr.statistics.anonymizeIP |
||
| 2045 | * |
||
| 2046 | * @param int $defaultIfEmpty |
||
| 2047 | * @return int |
||
| 2048 | */ |
||
| 2049 | 18 | public function getStatisticsAnonymizeIP($defaultIfEmpty = 0) |
|
| 2054 | |||
| 2055 | /** |
||
| 2056 | * Indicates if additional debug Data should be added to the statistics |
||
| 2057 | * |
||
| 2058 | * plugin.tx_solr.statistics.addDebugData |
||
| 2059 | * |
||
| 2060 | * @param bool $defaultIfEmpty |
||
| 2061 | * @return bool |
||
| 2062 | */ |
||
| 2063 | 20 | public function getStatisticsAddDebugData($defaultIfEmpty = false) |
|
| 2068 | |||
| 2069 | /** |
||
| 2070 | * Indicates if suggestion is enabled or not. |
||
| 2071 | * |
||
| 2072 | * plugin.tx_solr.suggest |
||
| 2073 | * |
||
| 2074 | * @param bool $defaultIfEmpty |
||
| 2075 | * @return bool |
||
| 2076 | */ |
||
| 2077 | 25 | public function getSuggest($defaultIfEmpty = false) |
|
| 2082 | |||
| 2083 | /** |
||
| 2084 | * Indicates if https should be used for the suggest form. |
||
| 2085 | * |
||
| 2086 | * plugin.tx_solr.suggest.forceHttps |
||
| 2087 | * |
||
| 2088 | * @param bool $defaultIfEmpty |
||
| 2089 | * @return bool |
||
| 2090 | */ |
||
| 2091 | 25 | public function getSuggestForceHttps($defaultIfEmpty = false) |
|
| 2096 | |||
| 2097 | /** |
||
| 2098 | * Returns the configured template for a specific template fileKey. |
||
| 2099 | * |
||
| 2100 | * plugin.tx_solr.search.templateFiles.<fileKey> |
||
| 2101 | * |
||
| 2102 | * @param string $fileKey |
||
| 2103 | * @param string $defaultIfEmpty |
||
| 2104 | * @return string |
||
| 2105 | */ |
||
| 2106 | 25 | public function getTemplateByFileKey($fileKey, $defaultIfEmpty = '') |
|
| 2111 | |||
| 2112 | /** |
||
| 2113 | * Returns the configuration of the crop view helper. |
||
| 2114 | * |
||
| 2115 | * plugin.tx_solr.viewHelpers.crop. |
||
| 2116 | * |
||
| 2117 | * @param array $defaultIfEmpty |
||
| 2118 | * @return array |
||
| 2119 | */ |
||
| 2120 | 1 | public function getViewHelpersCropConfiguration(array $defaultIfEmpty = []) |
|
| 2125 | |||
| 2126 | /** |
||
| 2127 | * Returns the configuration of the sorting view helper. |
||
| 2128 | * |
||
| 2129 | * plugin.tx_solr.viewHelpers.sortIndicator. |
||
| 2130 | * |
||
| 2131 | * @param array $defaultIfEmpty |
||
| 2132 | * @return array |
||
| 2133 | */ |
||
| 2134 | 17 | public function getViewHelpersSortIndicatorConfiguration(array $defaultIfEmpty = []) |
|
| 2139 | |||
| 2140 | /** |
||
| 2141 | * Controls whether ext-solr will send commits to solr. |
||
| 2142 | * Beware: If you disable this, you need to ensure |
||
| 2143 | * that some other mechanism will commit your changes |
||
| 2144 | * otherwise they will never be searchable. |
||
| 2145 | * A good way to achieve this is enabling the solr |
||
| 2146 | * daemons autoCommit feature. |
||
| 2147 | * |
||
| 2148 | * plugin.tx_solr.index.enableCommits |
||
| 2149 | * |
||
| 2150 | * @param bool $defaultIfEmpty |
||
| 2151 | * @return bool |
||
| 2152 | */ |
||
| 2153 | 11 | public function getEnableCommits($defaultIfEmpty = true) |
|
| 2158 | |||
| 2159 | /* |
||
| 2160 | * Applies the stdWrap if it is configured for the path, otherwise the unprocessed value will be returned. |
||
| 2161 | * |
||
| 2162 | * @param string $valuePath |
||
| 2163 | * @param mixed $value |
||
| 2164 | * @return mixed |
||
| 2165 | */ |
||
| 2166 | 7 | protected function renderContentElementOfConfigured($valuePath, $value) |
|
| 2177 | } |
||
| 2178 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: