You are here

interface ConfigurablePropertyInterface in Search API 8

Represents a processor-defined property with additional configuration.

Hierarchy

Expanded class hierarchy of ConfigurablePropertyInterface

All classes that implement ConfigurablePropertyInterface

9 files declare their use of ConfigurablePropertyInterface
AggregatedFieldProperty.php in src/Plugin/search_api/processor/Property/AggregatedFieldProperty.php
Field.php in src/Item/Field.php
FieldConfigurationForm.php in src/Form/FieldConfigurationForm.php
FieldsHelper.php in src/Utility/FieldsHelper.php
IndexAddFieldsForm.php in src/Form/IndexAddFieldsForm.php

... See full list

File

src/Processor/ConfigurablePropertyInterface.php, line 11

Namespace

Drupal\search_api\Processor
View source
interface ConfigurablePropertyInterface extends ProcessorPropertyInterface {

  /**
   * Gets the default configuration for this property.
   *
   * @return array
   *   An associative array with the default configuration.
   */
  public function defaultConfiguration();

  /**
   * Constructs a configuration form for a field based on this property.
   *
   * @param \Drupal\search_api\Item\FieldInterface $field
   *   The field for which the configuration form is constructed.
   * @param array $form
   *   An associative array containing the initial structure of the form.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The current state of the complete form.
   *
   * @return array
   *   The form structure.
   */
  public function buildConfigurationForm(FieldInterface $field, array $form, FormStateInterface $form_state);

  /**
   * Validates a configuration form for a field based on this property.
   *
   * @param \Drupal\search_api\Item\FieldInterface $field
   *   The field for which the configuration form is validated.
   * @param array $form
   *   An associative array containing the structure of the plugin form as built
   *   by static::buildConfigurationForm().
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The current state of the complete form.
   */
  public function validateConfigurationForm(FieldInterface $field, array &$form, FormStateInterface $form_state);

  /**
   * Submits a configuration form for a field based on this property.
   *
   * @param \Drupal\search_api\Item\FieldInterface $field
   *   The field for which the configuration form is submitted.
   * @param array $form
   *   An associative array containing the structure of the plugin form as built
   *   by static::buildConfigurationForm().
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The current state of the complete form.
   */
  public function submitConfigurationForm(FieldInterface $field, array &$form, FormStateInterface $form_state);

  /**
   * Retrieves the description for a field based on this property.
   *
   * @param \Drupal\search_api\Item\FieldInterface $field
   *   The field.
   *
   * @return string|null
   *   A human-readable description for the field, or NULL if the field has no
   *   description.
   */
  public function getFieldDescription(FieldInterface $field);

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurablePropertyInterface::buildConfigurationForm public function Constructs a configuration form for a field based on this property. 3
ConfigurablePropertyInterface::defaultConfiguration public function Gets the default configuration for this property. 1
ConfigurablePropertyInterface::getFieldDescription public function Retrieves the description for a field based on this property. 1
ConfigurablePropertyInterface::submitConfigurationForm public function Submits a configuration form for a field based on this property. 1
ConfigurablePropertyInterface::validateConfigurationForm public function Validates a configuration form for a field based on this property. 1
DataDefinitionInterface::addConstraint public function Adds a validation constraint. 2
DataDefinitionInterface::createFromDataType public static function Creates a new data definition object. 2
DataDefinitionInterface::getClass public function Returns the class used for creating the typed data object. 2
DataDefinitionInterface::getConstraint public function Returns a validation constraint. 2
DataDefinitionInterface::getConstraints public function Returns an array of validation constraints. 2
DataDefinitionInterface::getDataType public function Returns the data type of the data. 2
DataDefinitionInterface::getDescription public function Returns a human readable description. 2
DataDefinitionInterface::getLabel public function Returns a human readable label. 2
DataDefinitionInterface::getSetting public function Returns the value of a given setting. 2
DataDefinitionInterface::getSettings public function Returns the array of settings, as required by the used class. 2
DataDefinitionInterface::isComputed public function Determines whether the data value is computed. 3
DataDefinitionInterface::isInternal public function Determines whether the data value is internal. 2
DataDefinitionInterface::isList public function Returns whether the data is multi-valued, i.e. a list of data items. 2
DataDefinitionInterface::isReadOnly public function Determines whether the data is read-only. 3
DataDefinitionInterface::isRequired public function Determines whether a data value is required. 2
ProcessorPropertyInterface::getProcessorId public function Retrieves the ID of the processor which defines this property. 2
ProcessorPropertyInterface::isHidden public function Determines whether this property should be hidden from the UI. 2