original_string: public static function get_addable_lock_options() {
          $plugins = core_component::get_plugin_list_with_class('cachelock', '', 'lib.php');
          $options = array();
          $len = strlen('cachelock_');
          foreach ($plugins as $plugin => $class) {
              $method = "$class::can_add_instance";
              if (is_callable($method) && !call_user_func($method)) {
                  // Can't add an instance of this plugin.
                  continue;
              }
              $options[substr($plugin, $len)] = get_string('pluginname', $plugin);
          }
          return $options;
      }
code: public static function get_addable_lock_options() {
          $plugins = core_component::get_plugin_list_with_class('cachelock', '', 'lib.php');
          $options = array();
          $len = strlen('cachelock_');
          foreach ($plugins as $plugin => $class) {
              $method = "$class::can_add_instance";
              if (is_callable($method) && !call_user_func($method)) {
                  // Can't add an instance of this plugin.
                  continue;
              }
              $options[substr($plugin, $len)] = get_string('pluginname', $plugin);
          }
          return $options;
      }
code_tokens: public static function get_addable_lock_options ( ) { $ plugins = core_component :: get_plugin_list_with_class ( 'cachelock' , '' , 'lib.php' ) ; $ options = array ( ) ; $ len = strlen ( 'cachelock_' ) ; foreach ( $ plugins as $ plugin => $ class ) { $ method = "$class::can_add_instance" ; if ( is_callable ( $ method ) && ! call_user_func ( $ method ) ) { // Can't add an instance of this plugin. continue ; } $ options [ substr ( $ plugin , $ len ) ] = get_string ( 'pluginname' , $ plugin ) ; } return $ options ; }
docstring: Returns an array of lock plugins for which we can add an instance.
  
  Suitable for use within an mform select element.
  
  @return array
docstring_tokens: Returns an array of lock plugins for which we can add an instance .