Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
 
3
 
4
/**
5
 * Handles Ajax functionality that must be implemented separately for each of the
6
 * H5P plugins
7
 */
8
interface H5PEditorAjaxInterface {
9
 
10
  /**
11
   * Gets latest library versions that exists locally
12
   *
13
   * @return array Latest version of all local libraries
14
   */
15
  public function getLatestLibraryVersions();
16
 
17
  /**
18
   * Get locally stored Content Type Cache. If machine name is provided
19
   * it will only get the given content type from the cache
20
   *
21
   * @param $machineName
22
   *
23
   * @return array|object|null Returns results from querying the database
24
   */
25
  public function getContentTypeCache($machineName = NULL);
26
 
27
  /**
28
   * Gets recently used libraries for the current author
29
   *
30
   * @return array machine names. The first element in the array is the
31
   * most recently used.
32
   */
33
  public function getAuthorsRecentlyUsedLibraries();
34
 
35
  /**
36
   * Checks if the provided token is valid for this endpoint
37
   *
38
   * @param string $token The token that will be validated for.
39
   *
40
   * @return bool True if successful validation
41
   */
42
  public function validateEditorToken($token);
43
 
44
  /**
45
   * Get translations for a language for a list of libraries
46
   *
47
   * @param array $libraries An array of libraries, in the form "<machineName> <majorVersion>.<minorVersion>
48
   * @param string $language_code
49
   * @return array
50
   */
51
  public function getTranslations($libraries, $language_code);
52
}