本文整理汇总了PHP中ApacheSolrForTypo3\Solr\Site::getAvailableSitesSelector方法的典型用法代码示例。如果您正苦于以下问题:PHP Site::getAvailableSitesSelector方法的具体用法?PHP Site::getAvailableSitesSelector怎么用?PHP Site::getAvailableSitesSelector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApacheSolrForTypo3\Solr\Site
的用法示例。
在下文中一共展示了Site::getAvailableSitesSelector方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAdditionalFields
/**
* Used to define fields to provide the TYPO3 site to index and number of
* items to index per run when adding or editing a task.
*
* @param array $taskInfo reference to the array containing the info used in the add/edit form
* @param AbstractTask $task when editing, reference to the current task object. Null when adding.
* @param SchedulerModuleController $schedulerModule : reference to the calling object (Scheduler's BE module)
* @return array Array containing all the information pertaining to the additional fields
* The array is multidimensional, keyed to the task class name and each field's id
* For each field it provides an associative sub-array with the following:
*/
public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule)
{
$additionalFields = array();
if ($schedulerModule->CMD == 'add') {
$taskInfo['site'] = null;
$taskInfo['documentsToIndexLimit'] = 50;
}
if ($schedulerModule->CMD == 'edit') {
$taskInfo['site'] = $task->getSite();
$taskInfo['documentsToIndexLimit'] = $task->getDocumentsToIndexLimit();
}
$additionalFields['site'] = array('code' => Site::getAvailableSitesSelector('tx_scheduler[site]', $taskInfo['site']), 'label' => 'LLL:EXT:solr/Resources/Private/Language/ModuleScheduler.xml:field_site', 'cshKey' => '', 'cshLabel' => '');
$additionalFields['documentsToIndexLimit'] = array('code' => '<input type="text" name="tx_scheduler[documentsToIndexLimit]" value="' . htmlspecialchars($taskInfo['documentsToIndexLimit']) . '" />', 'label' => 'LLL:EXT:solr/Resources/Private/Language/ModuleScheduler.xml:indexqueueworker_field_documentsToIndexLimit', 'cshKey' => '', 'cshLabel' => '');
return $additionalFields;
}
示例2: getAdditionalFields
/**
* Used to define fields to provide the Solr server address when adding
* or editing a task.
*
* @param array $taskInfo reference to the array containing the info used in the add/edit form
* @param AbstractTask $task when editing, reference to the current task object. Null when adding.
* @param SchedulerModuleController $schedulerModule reference to the calling object (Scheduler's BE module)
* @return array Array containing all the information pertaining to the additional fields
* The array is multidimensional, keyed to the task class name and each field's id
* For each field it provides an associative sub-array with the following:
*/
public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule)
{
$this->initialize($taskInfo, $task, $schedulerModule);
$additionalFields = array();
$additionalFields['site'] = array('code' => Site::getAvailableSitesSelector('tx_scheduler[site]', $this->site), 'label' => 'LLL:EXT:solr/Resources/Private/Language/locallang.xlf:field_site', 'cshKey' => '', 'cshLabel' => '');
$additionalFields['indexingConfigurations'] = array('code' => $this->getIndexingConfigurationSelector(), 'label' => 'Index Queue configurations to re-index', 'cshKey' => '', 'cshLabel' => '');
return $additionalFields;
}