In Druapl 7 the "system" table will have all the module enable and disable status. In druapl 8
Description:
If you were running any queries against the {system} table, these won't work any more. For example:
Drupal 7:
Drupal 8:
Setting module weights:
Drupal 7:
Drupal 8:
To set a module's weight relative to another, a
Source : https://www.drupal.org/node/1813642
Drupal 7:
<?php
// Enable the admin theme.
db_update('system')
->fields(array('status' => 1))
->condition('type', 'theme')
->condition('name', 'seven')
->execute();
?>
Drupal 8:
<?php
theme_enable(array('seven'));
?>
Enable Module:
module_enable(array($module), FALSE);
module_enable($module_list, $enable_dependencies = TRUE)
Reff: http://www.drupalcontrib.org/api/drupal/drupal!core!includes!module.inc/function/module_enable/8
Drupal 7:
<?php
// Set a module's weight.
db_update('system')
->fields(array('weight' => $weight))
->condition('name', $mymodule)
->execute();
?>
<?php
module_set_weight($mymodule, $weight);
?>
module_get_weight
function is planned.Source : https://www.drupal.org/node/1813642
No comments:
Post a Comment