From dade7863efeb0354aa59f6c97af30e3a07f9af71 Mon Sep 17 00:00:00 2001 From: Matt Carmichael Date: Mon, 24 Sep 2018 11:47:14 -0500 Subject: [PATCH] remove urls search api processor --- .../processor/Property/UrlsProperty.php | 45 -------------- src/Plugin/search_api/processor/Urls.php | 61 ------------------- 2 files changed, 106 deletions(-) delete mode 100644 src/Plugin/search_api/processor/Property/UrlsProperty.php delete mode 100644 src/Plugin/search_api/processor/Urls.php diff --git a/src/Plugin/search_api/processor/Property/UrlsProperty.php b/src/Plugin/search_api/processor/Property/UrlsProperty.php deleted file mode 100644 index f35c3398c..000000000 --- a/src/Plugin/search_api/processor/Property/UrlsProperty.php +++ /dev/null @@ -1,45 +0,0 @@ - 'union', - 'fields' => [], - ]; - } - - /** - * {@inheritdoc} - */ - public function buildConfigurationForm(FieldInterface $field, array $form, FormStateInterface $form_state) { - $form['#attached']['library'][] = 'search_api/drupal.search_api.admin_css'; - $form['#tree'] = TRUE; - - $form['field_data'] = [ - '#type' => 'item', - '#title' => $this->t('URLs'), - '#description' => $this->t('URLs pointing to this node on all sites containing.'), - ]; - - return $form; - } - -} diff --git a/src/Plugin/search_api/processor/Urls.php b/src/Plugin/search_api/processor/Urls.php deleted file mode 100644 index b936548d2..000000000 --- a/src/Plugin/search_api/processor/Urls.php +++ /dev/null @@ -1,61 +0,0 @@ - $this->t('Urls'), - 'description' => $this->t('URLs pointing to this node on all sites containing.'), - 'type' => 'string', - 'processor_id' => $this->getPluginId(), - ]; - $properties['search_api_urls'] = new URLsProperty($definition); - } - - return $properties; - } - - /** - * {@inheritdoc} - */ - public function addFieldValues(ItemInterface $item) { - $url = $item->getDatasource()->getItemUrl($item->getOriginalObject()); - if ($url) { - $fields = $this->getFieldsHelper() - ->filterForPropertyPath($item->getFields(), NULL, 'search_api_urls'); - foreach ($fields as $field) { - $url = $url->setAbsolute()->toString(); - $field->addValue($url); - } - } - } -}