Commit 76f7b944 authored by alexpott's avatar alexpott
Browse files

Issue #1980338 by vineet.osscube, nick_schuch: Fixed Fatal error: Class...

Issue #1980338 by vineet.osscube, nick_schuch: Fixed Fatal error: Class 'plugin.manager.block' not found in /core/modules/system/system.module on line 1162.
parent f6b5925d
......@@ -51,4 +51,13 @@ function setUp() {
*/
function testBlockVisibility() {
}
/**
* Test block search.
*/
function testBlockSearch() {
$block = t('Administration');
$blocks = drupal_json_decode($this->drupalGet('system/autocomplete/block_plugin_ui:stark', array('query' => array('q' => $block))));
$this->assertEqual($blocks['system_menu_block:menu-admin'], $block, t('Can search for block with name !block.', array('!block' => $block)));
}
}
......@@ -1109,8 +1109,8 @@ function system_plugin_autocomplete($plugin_id) {
$string = drupal_strtolower(array_pop($string_typed));
$matches = array();
if ($string) {
$plugin_ui = drupal_container()->get('plugin.manager.system.plugin_ui')->getDefinition($plugin_id);
$manager = new $plugin_ui['manager']();
$plugin_ui = Drupal::service('plugin.manager.system.plugin_ui')->getDefinition($plugin_id);
$manager = Drupal::service($plugin_ui['manager']);
$titles = array();
foreach($manager->getDefinitions() as $plugin_id => $plugin) {
$titles[$plugin_id] = $plugin[$plugin_ui['title_attribute']];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment