You are here

function visitors_install in Visitors 8.2

Same name and namespace in other branches
  1. 8 visitors.install \visitors_install()
  2. 7.2 visitors.install \visitors_install()
  3. 7 visitors.install \visitors_install()

Implements hook_install().

File

./visitors.install, line 13
Install/uninstall visitors module.

Code

function visitors_install() {
  \Drupal::configFactory()
    ->getEditable('visitors.config')
    ->set('chart_height', 430)
    ->set('chart_width', 700)
    ->set('exclude_administer_users', 0)
    ->set('flush_log_timer', 0)
    ->set('items_per_page', 10)
    ->set('show_last_registered_user', 1)
    ->set('show_published_nodes', 1)
    ->set('show_registered_users_count', 1)
    ->set('show_since_date', 1)
    ->set('show_total_visitors', 1)
    ->set('show_unique_visitor', 1)
    ->set('show_user_ip', 1)
    ->set('start_count_total_visitors', 0)
    ->save();
}