Projet

Général

Profil

Paste
Télécharger (1,15 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / media / includes / MediaBrowserPluginInterface.inc @ 6ae446a4

1
<?php
2

    
3
/**
4
 * @file
5
 * Definition of MediaBrowserPluginInterface.
6
 */
7

    
8
/**
9
 * Defines a Media browser plugin.
10
 *
11
 * Extends the MediaBrowserPluginInterface with methods expected by all
12
 * Media browser classes.
13
 */
14
interface MediaBrowserPluginInterface {
15
  /**
16
   * Set up the plugin class.
17
   *
18
   * @param array $info
19
   *   An array of plugin info from hook_media_browser_plugin_info()
20
   *   implementations.
21
   * @param array $params
22
   *   An array of parameters which came in is $_GET['params']. The expected
23
   *   parameters are still being defined.
24
   *   - 'types': array of media types to support
25
   *   - 'multiselect': boolean; TRUE enables multiselect
26
   */
27
  public function __construct($info, $params);
28

    
29
  /**
30
   * Check if a user can access this plugin.
31
   *
32
   * @param object $account
33
   *   An optional user account object from user_load(). Defaults to the current
34
   *   global user.
35
   *
36
   * @return bool
37
   *   TRUE if the user can access this plugin, or FALSE otherwise.
38
   */
39
  public function access($account = NULL);
40

    
41
  // The view() method is an abstract function so it is defined in MediaBrowser
42
  // Plugin.
43
  // @todo public function view();
44
}