social_lms_integrator-1.0.0-beta4/modules/social_lms_integrator_export_applications/src/Plugin/SocialLMSIntegratorExportApplicationsPlugin/ApplicationAddressLocality.php

modules/social_lms_integrator_export_applications/src/Plugin/SocialLMSIntegratorExportApplicationsPlugin/ApplicationAddressLocality.php
<?php

namespace Drupal\social_lms_integrator_export_applications\Plugin\SocialLMSIntegratorExportApplicationsPlugin;

use Drupal\social_lms_integrator_export_applications\Plugin\SocialLMSIntegratorExportApplicationsPluginBase;
use Drupal\social_lms_integrator_application\ApplicationInterface;

/**
 * Provides a 'ApplicationAddressLocality' Social LMS Integrator export row.
 *
 * @SocialLMSIntegratorExportApplicationsPlugin(
 *  id = "application_address_locality",
 *  label = @Translation("Address locality"),
 *  weight = -480,
 * )
 */
class ApplicationAddressLocality extends SocialLMSIntegratorExportApplicationsPluginBase {

  /**
   * {@inheritdoc}
   */
  public function getHeader() {
    return $this->t('Address locality');
  }

  /**
   * {@inheritdoc}
   */
  public function getValue(ApplicationInterface $entity) {
    // Get the user from the Application entity
    $user = $this->getAccount($entity);
    return $this->profileGetAddressFieldValue('field_profile_address', 'locality', $this->getProfile($user));
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc