Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
setup
src
Magento
Setup
Model
Grid
TypeMapper.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Setup\Model\Grid
;
7
8
use
Magento\Framework\Composer\ComposerInformation
;
9
13
class
TypeMapper
14
{
18
const
UNDEFINED_PACKAGE_TYPE
=
'Undefined'
;
19
const
EXTENSION_PACKAGE_TYPE
=
'Extension'
;
20
const
THEME_PACKAGE_TYPE
=
'Theme'
;
21
const
MODULE_PACKAGE_TYPE
=
'Module'
;
22
const
LANGUAGE_PACKAGE_TYPE
=
'Language'
;
23
const
METAPACKAGE_PACKAGE_TYPE
=
'Metapackage'
;
24
const
COMPONENT_PACKAGE_TYPE
=
'Component'
;
25
const
LIBRARY_PACKAGE_TYPE
=
'Library'
;
31
private
$packageTypesMap = [
32
ComposerInformation::THEME_PACKAGE_TYPE
=>
self::THEME_PACKAGE_TYPE
,
33
ComposerInformation::LANGUAGE_PACKAGE_TYPE
=>
self::LANGUAGE_PACKAGE_TYPE
,
34
ComposerInformation::MODULE_PACKAGE_TYPE
=>
self::MODULE_PACKAGE_TYPE
,
35
ComposerInformation::METAPACKAGE_PACKAGE_TYPE
=>
self::METAPACKAGE_PACKAGE_TYPE
,
36
ComposerInformation::COMPONENT_PACKAGE_TYPE
=>
self::COMPONENT_PACKAGE_TYPE
,
37
ComposerInformation::LIBRARY_PACKAGE_TYPE
=>
self::LIBRARY_PACKAGE_TYPE
38
];
39
47
public
function
map
($packageType)
48
{
49
return
isset($this->packageTypesMap[$packageType]) ?
50
$this->packageTypesMap[$packageType] :
self::UNDEFINED_PACKAGE_TYPE
;
51
}
52
}
Magento\Setup\Model\Grid\TypeMapper\EXTENSION_PACKAGE_TYPE
const EXTENSION_PACKAGE_TYPE
Definition:
TypeMapper.php:19
Magento\Setup\Model\Grid\TypeMapper\MODULE_PACKAGE_TYPE
const MODULE_PACKAGE_TYPE
Definition:
TypeMapper.php:21
Magento\Setup\Model\Grid\TypeMapper
Definition:
TypeMapper.php:13
Magento\Framework\Composer\ComposerInformation\MODULE_PACKAGE_TYPE
const MODULE_PACKAGE_TYPE
Definition:
ComposerInformation.php:25
Magento\Setup\Model\Grid\TypeMapper\LANGUAGE_PACKAGE_TYPE
const LANGUAGE_PACKAGE_TYPE
Definition:
TypeMapper.php:22
Magento\Setup\Model\Grid\TypeMapper\METAPACKAGE_PACKAGE_TYPE
const METAPACKAGE_PACKAGE_TYPE
Definition:
TypeMapper.php:23
Magento\Setup\Model\Grid\TypeMapper\map
map($packageType)
Definition:
TypeMapper.php:47
Magento\Setup\Model\Grid\TypeMapper\UNDEFINED_PACKAGE_TYPE
const UNDEFINED_PACKAGE_TYPE
Definition:
TypeMapper.php:18
Magento\Setup\Model\Grid\TypeMapper\THEME_PACKAGE_TYPE
const THEME_PACKAGE_TYPE
Definition:
TypeMapper.php:20
Magento\Framework\Composer\ComposerInformation\THEME_PACKAGE_TYPE
const THEME_PACKAGE_TYPE
Definition:
ComposerInformation.php:20
Magento\Framework\Composer\ComposerInformation\COMPONENT_PACKAGE_TYPE
const COMPONENT_PACKAGE_TYPE
Definition:
ComposerInformation.php:45
Magento\Setup\Model\Grid\TypeMapper\LIBRARY_PACKAGE_TYPE
const LIBRARY_PACKAGE_TYPE
Definition:
TypeMapper.php:25
Magento\Framework\Composer\ComposerInformation\LANGUAGE_PACKAGE_TYPE
const LANGUAGE_PACKAGE_TYPE
Definition:
ComposerInformation.php:30
Magento\Framework\Composer\ComposerInformation
Definition:
ComposerInformation.php:15
Magento\Setup\Model\Grid
Definition:
Extension.php:6
Magento\Framework\Composer\ComposerInformation\METAPACKAGE_PACKAGE_TYPE
const METAPACKAGE_PACKAGE_TYPE
Definition:
ComposerInformation.php:35
Magento\Framework\Composer\ComposerInformation\LIBRARY_PACKAGE_TYPE
const LIBRARY_PACKAGE_TYPE
Definition:
ComposerInformation.php:40
Magento\Setup\Model\Grid\TypeMapper\COMPONENT_PACKAGE_TYPE
const COMPONENT_PACKAGE_TYPE
Definition:
TypeMapper.php:24