social_lms_integrator-1.0.0-beta4/modules/social_lms_integrator_export/src/Plugin/SocialLMSIntegratorExportPlugin/IterationEnrollmentAddressLine1.php

modules/social_lms_integrator_export/src/Plugin/SocialLMSIntegratorExportPlugin/IterationEnrollmentAddressLine1.php
<?php

namespace Drupal\social_lms_integrator_export\Plugin\SocialLMSIntegratorExportPlugin;

use Drupal\social_lms_integrator_export\Plugin\SocialLMSIntegratorExportPluginBase;
use Drupal\social_lms_integrator_enrollment\IterationEnrollmentInterface;

/**
 * Provides a 'IterationEnrollmentAddressLine1' Social LMS Integrator export row.
 *
 * @SocialLMSIntegratorExportPlugin(
 *  id = "iteration_enrollment_address_line1",
 *  label = @Translation("Address line 1"),
 *  weight = -480,
 * )
 */
class IterationEnrollmentAddressLine1 extends SocialLMSIntegratorExportPluginBase {

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

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

}

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

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