<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}

class auth_vk_install extends InstallController
{

    public function __construct()
    {
        parent::__construct();

        // Set acl module name
        $this->module_config['module_acl_name'] = 'auth_vk';

        // Set title
        $this->module_config['module_title'] = $this->lang->line('Auth by vk');

        // Set actions
        $this->module_config['module_actions'] = array(
            // 'acl_action' => 'description'
            'view_news' => $this->lang->line('View'),
            'edit_news' => $this->lang->line('Edit'),
        );

        // Set menu items
        $this->module_config['module_menu_items'] = array(
//            array('method in admin controller', 'title in menu', 'path to the image. empty - default image', 'acl_action')
            array('manage', $this->lang->line('Auth google manage'), '', 'view_auth_vk'),
        );
    }

    public function install()
    {
        return parent::install(array(
                    'shemaFile' => dirname(__DIR__) . '/data/install.sql',
        ));
    }

    public function uninstall()
    {
        return parent::uninstall(array(
                    'dropTables' => array(
                        'acl_user_vk'
                    ),
        ));
    }

}
