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

modules/social_lms_integrator_export/src/Plugin/SocialLMSIntegratorExportPlugin/IterationEnrollmentLastName.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 'UserLastName' Social LMS Integrator export row.
 *
 * @SocialLMSIntegratorExportPlugin(
 *  id = "iteration_enrollment_last_name",
 *  label = @Translation("Last name"),
 *  weight = -470,
 * )
 */
class IterationEnrollmentLastName extends SocialLMSIntegratorExportPluginBase {

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

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

}

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

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