phpbb-extensions/boardrules

View on GitHub
migrations/v10x/m6_initial_module.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
/**
*
* Board Rules extension for the phpBB Forum Software package.
*
* @copyright (c) 2014 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace phpbb\boardrules\migrations\v10x;

/**
* Migration stage 6: Initial module
*/
class m6_initial_module extends \phpbb\db\migration\migration
{
    /**
    * Assign migration file dependencies for this migration
    *
    * @return array Array of migration files
    * @static
    * @access public
    */
    public static function depends_on()
    {
        return array('\phpbb\boardrules\migrations\v10x\m5_initial_permission');
    }

    /**
    * Add or update data in the database
    *
    * @return array Array of table data
    * @access public
    */
    public function update_data()
    {
        return array(
            array('module.add', array('acp', 'ACP_CAT_DOT_MODS', 'ACP_BOARDRULES')),
            array('module.add', array(
                'acp', 'ACP_BOARDRULES', array(
                    'module_basename'    => '\phpbb\boardrules\acp\boardrules_module',
                    'modes'                => array('settings', 'manage'),
                ),
            )),
        );
    }
}