You are here

interface UserExportPluginInterface in Open Social 10.1.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_user_export/src/Plugin/UserExportPluginInterface.php \Drupal\social_user_export\Plugin\UserExportPluginInterface
  2. 8.3 modules/social_features/social_user_export/src/Plugin/UserExportPluginInterface.php \Drupal\social_user_export\Plugin\UserExportPluginInterface
  3. 8.4 modules/social_features/social_user_export/src/Plugin/UserExportPluginInterface.php \Drupal\social_user_export\Plugin\UserExportPluginInterface
  4. 8.5 modules/social_features/social_user_export/src/Plugin/UserExportPluginInterface.php \Drupal\social_user_export\Plugin\UserExportPluginInterface
  5. 8.6 modules/social_features/social_user_export/src/Plugin/UserExportPluginInterface.php \Drupal\social_user_export\Plugin\UserExportPluginInterface
  6. 8.7 modules/social_features/social_user_export/src/Plugin/UserExportPluginInterface.php \Drupal\social_user_export\Plugin\UserExportPluginInterface
  7. 8.8 modules/social_features/social_user_export/src/Plugin/UserExportPluginInterface.php \Drupal\social_user_export\Plugin\UserExportPluginInterface
  8. 10.3.x modules/social_features/social_user_export/src/Plugin/UserExportPluginInterface.php \Drupal\social_user_export\Plugin\UserExportPluginInterface
  9. 10.0.x modules/social_features/social_user_export/src/Plugin/UserExportPluginInterface.php \Drupal\social_user_export\Plugin\UserExportPluginInterface
  10. 10.2.x modules/social_features/social_user_export/src/Plugin/UserExportPluginInterface.php \Drupal\social_user_export\Plugin\UserExportPluginInterface

Defines an interface for User export plugin plugins.

Hierarchy

Expanded class hierarchy of UserExportPluginInterface

All classes that implement UserExportPluginInterface

File

modules/social_features/social_user_export/src/Plugin/UserExportPluginInterface.php, line 12

Namespace

Drupal\social_user_export\Plugin
View source
interface UserExportPluginInterface extends PluginInspectionInterface {

  /**
   * Returns the header.
   *
   * @return \Drupal\Core\StringTranslation\TranslatableMarkup|string
   *   The header.
   */
  public function getHeader();

  /**
   * Returns the value.
   *
   * @param \Drupal\user\UserInterface $entity
   *   The User entity to get the value from.
   *
   * @return string
   *   The value.
   */
  public function getValue(UserInterface $entity);

  /**
   * Get the Profile entity.
   *
   * @param \Drupal\user\UserInterface $entity
   *   The user entity to get the profile from.
   *
   * @return \Drupal\profile\Entity\ProfileInterface|null
   *   Returns the Profile or NULL if profile does not exist.
   */
  public function getProfile(UserInterface $entity);

  /**
   * Returns the value of a field for a given profile.
   *
   * @param string $field_name
   *   The field name to get the value for.
   * @param \Drupal\profile\Entity\ProfileInterface $user_profile
   *   The profile to get the data for.
   *
   * @return string
   *   Returns value of the field.
   */
  public function profileGetFieldValue($field_name, ProfileInterface $user_profile = NULL);

  /**
   * Returns the value for the address field and element within address.
   *
   * @param string $field_name
   *   The field name to get the value for.
   * @param string $address_element
   *   The address element to get the value for, e.g. 'country_code'.
   * @param \Drupal\profile\Entity\ProfileInterface $user_profile
   *   The profile to get the data for.
   *
   * @return string
   *   Returns the value of the address element for the profile.
   */
  public function profileGetAddressFieldValue($field_name, $address_element, ProfileInterface $user_profile = NULL);

  /**
   * Returns the values of a taxonomy reference field.
   *
   * @param string $field_name
   *   The field name to get the value for, should be taxonomy term reference.
   * @param \Drupal\profile\Entity\ProfileInterface $user_profile
   *   The profile to get the data for.
   *
   * @return string
   *   Returns comma separated string of taxonomy terms of the field.
   */
  public function profileGetTaxonomyFieldValue($field_name, ProfileInterface $user_profile = NULL);

}

Members

Namesort descending Modifiers Type Description Overrides
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
UserExportPluginInterface::getHeader public function Returns the header. 1
UserExportPluginInterface::getProfile public function Get the Profile entity. 1
UserExportPluginInterface::getValue public function Returns the value. 1
UserExportPluginInterface::profileGetAddressFieldValue public function Returns the value for the address field and element within address. 1
UserExportPluginInterface::profileGetFieldValue public function Returns the value of a field for a given profile. 1
UserExportPluginInterface::profileGetTaxonomyFieldValue public function Returns the values of a taxonomy reference field. 1