Skip to content
Snippets Groups Projects

Resolve #3467947 "Separate indexing settings"

Closes #3467947

image

image

image

Edited by Bryan Heisler

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
11 use Drupal\Core\Url;
12 use Drupal\search\Entity\SearchPage;
13 use Drupal\search\SearchIndexInterface;
14 use Symfony\Component\DependencyInjection\ContainerInterface;
15
16 /**
17 * Provides a Search form.
18 */
19 final class IndexSettingsForm extends FormBase {
20
21 /**
22 * The entities being listed.
23 *
24 * @var \Drupal\search\SearchPageInterface[]
25 */
26 protected $entities = [];
  • 44 *
    45 * @var \Drupal\Core\Extension\ModuleHandlerInterface
    46 */
    47 protected $moduleHandler;
    48
    49 /**
    50 * Constructs a new SearchPageListBuilder object.
    51 *
    52 * @param \Drupal\Core\Messenger\MessengerInterface $messenger
    53 * The messenger.
    54 * @param \Drupal\search\SearchIndexInterface $search_index
    55 * The search index.
    56 * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    57 * The module handler.
    58 */
    59 public function __construct(MessengerInterface $messenger, SearchIndexInterface $search_index, ModuleHandlerInterface $module_handler) {
  • 173 $form['actions']['#type'] = 'actions';
    174 $form['actions']['submit'] = [
    175 '#type' => 'submit',
    176 '#value' => $this->t('Save configuration'),
    177 '#button_type' => 'primary',
    178 ];
    179
    180 return $form;
    181 }
    182
    183 /**
    184 * {@inheritdoc}
    185 */
    186 public function validateForm(array &$form, FormStateInterface $form_state): void {
    187 // @todo Validate the form here.
    188 // Example:
  • 6 6 requirements:
    7 7 _permission: 'administer search'
    8 8
    9 search.index_settings:
  • 72 $container->get('search.index'),
    73 $container->get('module_handler')
    74 );
    75 }
    76
    77 /**
    78 * {@inheritdoc}
    79 */
    80 public function getFormId(): string {
    81 return 'search_index_settings';
    82 }
    83
    84 /**
    85 * {@inheritdoc}
    86 */
    87 public function buildForm(array $form, FormStateInterface $form_state): array {
  • Bryan Heisler added 153 commits

    added 153 commits

    Compare with previous version

  • shalini jha added 42 commits

    added 42 commits

    Compare with previous version

  • shalini jha added 1 commit

    added 1 commit

    • db595861 - Update SearchPageListBuilder.php

    Compare with previous version

  • shalini jha added 102 commits

    added 102 commits

    Compare with previous version

  • shalini jha added 1 commit

    added 1 commit

    • 511acea8 - Update IndexSettingsForm.php

    Compare with previous version

  • Bryan Heisler added 203 commits

    added 203 commits

    Compare with previous version

  • shalini jha added 483 commits

    added 483 commits

    Compare with previous version

  • shalini jha added 1 commit

    added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading