You are here

LearningPathMembersPluginBase.php in Opigno Learning path 8

Same filename and directory in other branches
  1. 3.x src/LearningPathMembersPluginBase.php

File

src/LearningPathMembersPluginBase.php
View source
<?php

namespace Drupal\opigno_learning_path;

use Drupal\Component\Plugin\PluginBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\group\Entity\Group;
use Drupal\user\Entity\User;

/**
 * Class LearningPathMembersPluginBase.
 */
abstract class LearningPathMembersPluginBase extends PluginBase implements LearningPathMembersPluginInterface {

  /**
   * LearningPathMembersPluginBase constructor.
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
  }

  /**
   * {@inheritdoc}
   */
  public function getId() {
    return $this->pluginDefinition['id'];
  }

  /**
   * {@inheritdoc}
   */
  public function getMembersForm(array &$form, FormStateInterface $form_state, User $current_user) {
  }

  /**
   * Returns group members uids.
   *
   * @param \Drupal\group\Entity\Group $group
   *   Group object.
   *
   * @return array|null
   *   Array of members uids if exist, null otherwise.
   */
  public function getGroupMembersIds(Group $group) {
  }

}

Classes

Namesort descending Description
LearningPathMembersPluginBase Class LearningPathMembersPluginBase.