You are here

class UrlsProperty in Search API Field Map 4.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/search_api/processor/Property/UrlsProperty.php \Drupal\search_api_field_map\Plugin\search_api\processor\Property\UrlsProperty
  2. 8 src/Plugin/search_api/processor/Property/UrlsProperty.php \Drupal\search_api_field_map\Plugin\search_api\processor\Property\UrlsProperty
  3. 8.2 src/Plugin/search_api/processor/Property/UrlsProperty.php \Drupal\search_api_field_map\Plugin\search_api\processor\Property\UrlsProperty

Defines a "Urls" property.

Hierarchy

  • class \Drupal\search_api_field_map\Plugin\search_api\processor\Property\UrlsProperty extends \Drupal\search_api\Processor\ConfigurablePropertyBase uses StringTranslationTrait

Expanded class hierarchy of UrlsProperty

See also

\Drupal\search_api\Plugin\search_api\processor\Urls

1 file declares its use of UrlsProperty
Urls.php in src/Plugin/search_api/processor/Urls.php

File

src/Plugin/search_api/processor/Property/UrlsProperty.php, line 15

Namespace

Drupal\search_api_field_map\Plugin\search_api\processor\Property
View source
class UrlsProperty extends ConfigurablePropertyBase {
  use StringTranslationTrait;

  /**
   * {@inheritdoc}
   */
  public function defaultConfiguration() {
    return [
      'type' => '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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
StringTranslationTrait::$stringTranslation protected property The string translation service. 4
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
UrlsProperty::buildConfigurationForm public function
UrlsProperty::defaultConfiguration public function