Skip to content

Commit

Permalink
Scaffold membership provider plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
bradjones1 committed May 17, 2022
1 parent e5ec2e3 commit a5c49af
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
7 changes: 7 additions & 0 deletions membership_provider_apple.info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: App Store/iTunes Membership Provider
type: module
description: App Store/iTunes Membership Provider
core_version_requirement: ^9
package: Membership
dependencies:
- membership:membership
49 changes: 49 additions & 0 deletions src/Plugin/MembershipProvider/Apple.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

declare(strict_types=1);

namespace Drupal\membership_provider_apple\Plugin\MembershipProvider;

use Drupal\Core\Form\FormStateInterface;
use Drupal\membership\Entity\MembershipInterface;
use Drupal\membership\Plugin\MembershipProviderBase;

/**
* Apple membership provider.
*
* @MembershipProvider(
* id = "apple",
* label = "iTunes Store/Apple",
* )
*/
final class Apple extends MembershipProviderBase {

/**
* @inheritDoc
*/
public function postCreateMembership(MembershipInterface $membership, array $pluginValues = []): void {
// TODO: Implement postCreateMembership() method.
}

/**
* @inheritDoc
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
return $form;
}

/**
* @inheritDoc
*/
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
// TODO: Implement validateConfigurationForm() method.
}

/**
* @inheritDoc
*/
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
// TODO: Implement submitConfigurationForm() method.
}

}

0 comments on commit a5c49af

Please sign in to comment.