marketo_ma-8.x-2.x-dev/modules/marketo_ma_user/marketo_ma_user.module

modules/marketo_ma_user/marketo_ma_user.module
<?php

/**
 * @file
 * Contains marketo_ma_user.module.
 */

use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\user\UserInterface;

/**
 * Implements hook_help().
 */
function marketo_ma_user_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    // Main module help for the marketo_ma_user module.
    case 'help.page.marketo_ma_user':
      return t('<h3>:title</h3><p>:description</p>', [
        ':title' => 'About',
        ':description' => 'Integrates Marketo with core User actions.',
      ]);

    default:
  }
}

/**
 * Implements hook_user_login().
 */
function marketo_ma_user_user_login($account) {
  // Hand off to the marketo_ma.user service.
  \Drupal::service('marketo_ma.user')->userLogin($account);
}

/**
 * Implements hook_ENTITY_TYPE_create().
 */
function marketo_ma_user_user_create(UserInterface $entity) {
  // Hand off to the marketo_ma.user service.
  \Drupal::service('marketo_ma.user')->userCreate($entity);
}

/**
 * Implements hook_ENTITY_TYPE_update().
 */
function marketo_ma_user_user_update(UserInterface $entity) {
  // Hand off to the marketo_ma.user service.
  \Drupal::service('marketo_ma.user')->userUpdate($entity);
}

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

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