Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 39 and 311]

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