function subscriptions_install in Subscriptions 2.0.x
Same name and namespace in other branches
- 5.2 subscriptions.install \subscriptions_install()
- 5 subscriptions.install \subscriptions_install()
- 6 subscriptions.install \subscriptions_install()
- 7 subscriptions.install \subscriptions_install()
Implements hook_install().
File
- ./
subscriptions.install, line 278 - Subscriptions module installation.
Code
function subscriptions_install() {
\Drupal::database()
->insert('subscriptions_user')
->fields([
'uid',
], [
0,
])
->execute();
$select = \Drupal::database()
->select('users', 'u')
->fields('u', [
'uid',
])
->condition('u.uid', 0, '>');
\Drupal::database()
->insert('subscriptions_user')
->from($select)
->execute();
}