mirror of
https://github.com/foomo/Foomo.Magento2.git
synced 2025-10-16 12:35:34 +00:00
Initial commit
This commit is contained in:
parent
0a9be54c42
commit
084843dd7c
15
lib/Foomo/Magento2/DomainConfig.php
Normal file
15
lib/Foomo/Magento2/DomainConfig.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/*
|
||||
*/
|
||||
|
||||
namespace Foomo\Magento2;
|
||||
|
||||
|
||||
class DomainConfig extends \Foomo\Config\AbstractConfig {
|
||||
|
||||
const NAME = 'Foomo.Magento2';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $magentoRootFolder = '';
|
||||
}
|
||||
87
lib/Foomo/Magento2/Module.php
Normal file
87
lib/Foomo/Magento2/Module.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the foomo Opensource Framework.
|
||||
*
|
||||
* The foomo Opensource Framework is free software: you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* The foomo Opensource Framework is distributed in the hope that it will
|
||||
* be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License along with
|
||||
* the foomo Opensource Framework. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace Foomo\Magento2;
|
||||
|
||||
/**
|
||||
* @link www.foomo.org
|
||||
* @license www.gnu.org/licenses/lgpl.txt
|
||||
*/
|
||||
class Module extends \Foomo\Modules\ModuleBase
|
||||
{
|
||||
//---------------------------------------------------------------------------------------------
|
||||
// ~ Constants
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* the name of this module
|
||||
*
|
||||
*/
|
||||
const NAME = 'Foomo.Magento2';
|
||||
|
||||
const VERSION = '1.0.0';
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
// ~ Overriden static methods
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Your module needs to be set up, before being used - this is the place to do it
|
||||
*/
|
||||
public static function initializeModule()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a plain text description of what this module does
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDescription()
|
||||
{
|
||||
return 'Magento2 integration';
|
||||
}
|
||||
|
||||
/**
|
||||
* get all the module resources
|
||||
*
|
||||
* @return \Foomo\Modules\Resource[]
|
||||
*/
|
||||
public static function getResources()
|
||||
{
|
||||
return array(
|
||||
// get a run mode independent folder var/<runMode>/test
|
||||
// \Foomo\Modules\Resource\Fs::getVarResource(\Foomo\Modules\Resource\Fs::TYPE_FOLDER, 'test'),
|
||||
// and a file in it
|
||||
// \Foomo\Modules\Resource\Fs::getVarResource(\Foomo\Modules\Resource\Fs::TYPE_File, 'test' . DIRECTORY_SEPARATOR . 'someFile'),
|
||||
// request a cache resource
|
||||
// \Foomo\Modules\Resource\Fs::getCacheResource(\Foomo\Modules\Resource\Fs::TYPE_FOLDER, 'navigationLeaves'),
|
||||
// a database configuration
|
||||
\Foomo\Modules\Resource\Config::getResource('Foomo.Magento2', 'Foomo.Magento2')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DomainConfig
|
||||
*/
|
||||
public static function getModuleConfig()
|
||||
{
|
||||
return \Foomo\Config::getConf(self::NAME, DomainConfig::NAME);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user