You are here

media_entity_pinterest.module in Media entity Pinterest 8

Same filename and directory in other branches
  1. 8.2 media_entity_pinterest.module

Hook implementations for media_entity_pinterest module.

File

media_entity_pinterest.module
View source
<?php

/**
 * @file
 * Hook implementations for media_entity_pinterest module.
 */
use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().
 */
function media_entity_pinterest_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.media_entity_pinterest':
      $output = '<h3>' . t('About') . '</h3>';
      $output .= '<p>';
      $output .= t('The Media entity Pinterest module provides Pinterest integration for Media entity (i.e. media type provider plugin) For more information, see the <a href=":media_entity_pinterest"> Media entity Pinterest</a> project page and the <a href=":media_guide"> Media module guide for Drupal 8</a>.', [
        ':media_entity_pinterest' => 'https://www.drupal.org/project/media_entity_pinterest',
        ':media_guide' => 'https://www.drupal.org/docs/8/core/modules/media',
      ]);
      $output .= '</p>';
      return $output;
  }
}

/**
 * Implements hook_theme().
 */
function media_entity_pinterest_theme() {
  return [
    'media_entity_pinterest_board' => [
      'variables' => [
        'path' => NULL,
        'attributes' => [],
      ],
    ],
    'media_entity_pinterest_board_section' => [
      'variables' => [
        'path' => NULL,
        'attributes' => [],
      ],
    ],
    'media_entity_pinterest_pin' => [
      'variables' => [
        'path' => NULL,
        'attributes' => [],
      ],
    ],
    'media_entity_pinterest_profile' => [
      'variables' => [
        'path' => NULL,
        'attributes' => [],
      ],
    ],
  ];
}

Functions