You are here

class InviteManager in User External Invite 8

Same name and namespace in other branches
  1. 2.0.x src/InviteManager.php \Drupal\user_external_invite\InviteManager

Hierarchy

Expanded class hierarchy of InviteManager

1 file declares its use of InviteManager
UserInviteController.php in src/Controller/UserInviteController.php
1 string reference to 'InviteManager'
user_external_invite.services.yml in ./user_external_invite.services.yml
user_external_invite.services.yml
1 service uses InviteManager
user_external_invite.invite_manager in ./user_external_invite.services.yml
Drupal\user_external_invite\InviteManager

File

src/InviteManager.php, line 7

Namespace

Drupal\user_external_invite
View source
class InviteManager {
  private $dynamic;
  public function __construct(KeyValueFactoryInterface $keyValueFactory, $dynamic) {
    $this->keyValueFactory = $keyValueFactory;
    $this->dynamic = $dynamic;
  }
  public function sendInvite($message) {
    $key = $this->keyValueFactory
      ->get('ding');
    if ($this
      ->getDynamic()) {
      $key
        ->set('joop', $message);
      return;
    }
    $key
      ->set('joop', 'default');
  }

  /**
   * @return mixed
   */
  public function getDynamic() {
    return $this->dynamic;
  }

}

Members