Ajout d'une extension

This commit is contained in:
Gauvain Boiché
2020-04-04 18:27:27 +02:00
parent c3ed8cc1c1
commit 3a964fe237
387 changed files with 58921 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
<?php
/**
*
* phpBB Studio - Advanced Shop System. An extension for the phpBB Forum Software package.
*
* @copyright (c) 2019, phpBB Studio, https://www.phpbbstudio.com
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
namespace phpbbstudio\ass\migrations;
/**
* phpBB Studio - Advanced Shop System: Directories migration
*/
class install_directories extends \phpbb\db\migration\migration
{
/**
* Assign migration file dependencies for this migration.
*
* @return array Array of migration files
* @access public
* @static
*/
static public function depends_on()
{
return ['\phpbbstudio\ass\migrations\install_configuration'];
}
/**
* Create the shop directories to the filesystem.
*
* @return array
* @access public
*/
public function update_data()
{
return [
['custom', [[$this, 'create_shop_directories']]],
];
}
/**
* Create the shop directories.
*
* @throws \Exception
* @return void
* @access public
*/
public function create_shop_directories()
{
global $phpbb_container;
/** @var \phpbb\filesystem\filesystem $filesystem */
$filesystem = $phpbb_container->get('filesystem');
$directories = [
$this->phpbb_root_path . 'files/aps',
$this->phpbb_root_path . 'images/aps',
];
$filesystem->mkdir($directories);
}
}