You are here

function search_api_solr_update_8200 in Search API Solr 4.x

Same name and namespace in other branches
  1. 8.3 search_api_solr.install \search_api_solr_update_8200()
  2. 8.2 search_api_solr.install \search_api_solr_update_8200()

Install Solr Field Types.

File

./search_api_solr.install, line 532
Install, update and uninstall functions for the Search API Solr module.

Code

function search_api_solr_update_8200() {

  // 8.x-1.x to 8.x-2.x migration path is obsolete and therefore removed. Just
  // install the latest field types.
  \Drupal::entityDefinitionUpdateManager()
    ->installEntityType(new ConfigEntityType([
    'id' => 'solr_field_type',
    'label' => new TranslatableMarkup('Solr Field Type'),
    'handlers' => [
      'list_builder' => 'Drupal\\search_api_solr\\Controller\\SolrFieldTypeListBuilder',
      'form' => [
        'add' => 'Drupal\\search_api_solr\\Form\\SolrFieldTypeForm',
        'edit' => 'Drupal\\search_api_solr\\Form\\SolrFieldTypeForm',
        'delete' => 'Drupal\\search_api_solr\\Form\\SolrFieldTypeDeleteForm',
      ],
    ],
    'config_prefix' => 'solr_field_type',
    'admin_permission' => 'administer search_api',
    'entity_keys' => [
      'id' => 'id',
      'label' => 'label',
      'uuid' => 'uuid',
    ],
    'links' => [
      'edit-form' => '/admin/config/search/search-api/solr_field_type/{solr_field_type}',
      'delete-form' => '/admin/config/search/search-api/solr_field_type/{solr_field_type}/delete',
      'disable-for-server' => '/admin/config/search/search-api/server/{search_api_server}/solr_field_type/{solr_field_type}/disable',
      'enable-for-server' => '/admin/config/search/search-api/server/{search_api_server}/solr_field_type/{solr_field_type}/enable',
      'collection' => '/admin/config/search/search-api/server/{search_api_server}/solr_field_type',
    ],
  ]));
  search_api_solr_update_helper_install_configs();
}