Update to Drupal 8.0.1. For more information, see https://www.drupal.org/node/2627402

This commit is contained in:
Pantheon Automation 2015-12-02 11:38:43 -08:00 committed by Greg Anderson
parent 013aaaf2ff
commit 1a0e9d9fac
153 changed files with 1268 additions and 670 deletions

View file

@ -61,32 +61,6 @@ function module_test_hook_info() {
return $hooks;
}
/**
* Page callback for 'hook dynamic loading' test.
*
* If the hook is dynamically loaded correctly, the menu callback should
* return 'success!'.
*
* @deprecated \Drupal\module_test\Controller\ModuleTestController::hookDynamicLoadingInvoke()
*/
function module_test_hook_dynamic_loading_invoke() {
$result = \Drupal::moduleHandler()->invoke('module_test', 'test_hook');
return $result['module_test'];
}
/**
* Page callback for 'hook dynamic loading' test.
*
* If the hook is dynamically loaded correctly, the menu callback should
* return 'success!'.
*
* @deprecated \Drupal\module_test\Controller\ModuleTestController::hookDynamicLoadingInvokeAll()
*/
function module_test_hook_dynamic_loading_invoke_all() {
$result = \Drupal::moduleHandler()->invokeAll('test_hook');
return $result['module_test'];
}
/**
* Load function used by module_test_hook_dynamic_loading_invoke_all_during_load().
*
@ -97,23 +71,6 @@ function module_test_load($param) {
return $result[$param];
}
/**
* Page callback for 'class loading' test.
*
* This module does not have a dependency on module_autoload_test.module. If
* that module is enabled, this function should return the string
* 'Drupal\\module_autoload_test\\SomeClass::testMethod() was invoked.'. If
* that module is not enabled, this function should return nothing.
*
* @deprecated \Drupal\module_test\Controller\ModuleTestController::testClassLoading()
*/
function module_test_class_loading() {
if (class_exists('Drupal\module_autoload_test\SomeClass')) {
$obj = new Drupal\module_autoload_test\SomeClass();
return $obj->testMethod();
}
}
/**
* Implements hook_modules_installed().
*/

View file

@ -13,24 +13,40 @@ namespace Drupal\module_test\Controller;
class ModuleTestController {
/**
* @todo Remove module_test_hook_dynamic_loading_invoke().
* Returns dynamically invoked hook results for the 'module_test' module
*
* @return array
* Renderable array.
*/
public function hookDynamicLoadingInvoke() {
return module_test_hook_dynamic_loading_invoke();
$result = \Drupal::moduleHandler()->invoke('module_test', 'test_hook');
return $result['module_test'];
}
/**
* @todo Remove module_test_hook_dynamic_loading_invoke_all().
* Returns dynamically invoked hook results for all modules.
*
* @return array
* Renderable array.
*/
public function hookDynamicLoadingInvokeAll() {
return module_test_hook_dynamic_loading_invoke_all();
$result = \Drupal::moduleHandler()->invokeAll('test_hook');
return $result['module_test'];
}
/**
* @todo Remove module_test_class_loading().
* Returns the result of an autoloaded class's public method.
*
* @return array
* Renderable array.
*/
public function testClassLoading() {
return ['#markup' => module_test_class_loading()];
$markup = NULL;
if (class_exists('Drupal\module_autoload_test\SomeClass')) {
$obj = new \Drupal\module_autoload_test\SomeClass();
$markup = $obj->testMethod();
}
return ['#markup' => $markup];
}
}

View file

@ -8,7 +8,10 @@
use Drupal\Core\Extension\Extension;
/**
* Implements hook_init().
* Includes .theme file from themes.
*
* @param \Drupal\Core\Extension\Extension $theme
* The theme extension object.
*/
function nyan_cat_init(Extension $theme) {
$theme->load();