Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Data Class Reference
Inheritance diagram for Data:
AbstractHelper

Public Member Functions

 mapResources (array $resources)
 
 isConfigType ($integrationData)
 
- Public Member Functions inherited from AbstractHelper
 __construct (Context $context)
 
 isModuleOutputEnabled ($moduleName=null)
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractHelper
 _getRequest ()
 
 _getModuleName ()
 
 _getUrl ($route, $params=[])
 
- Protected Attributes inherited from AbstractHelper
 $_moduleName
 
 $_request
 
 $_moduleManager
 
 $_logger
 
 $_urlBuilder
 
 $_httpHeader
 
 $_eventManager
 
 $_remoteAddress
 
 $urlEncoder
 
 $urlDecoder
 
 $scopeConfig
 
 $_cacheConfig
 

Detailed Description

Definition at line 10 of file Data.php.

Member Function Documentation

◆ isConfigType()

isConfigType (   $integrationData)

Check if integration is created using config file

Parameters
array$integrationData
Returns
bool true if integration is created using Config file

Definition at line 41 of file Data.php.

42  {
43  return isset(
44  $integrationData[IntegrationModel::SETUP_TYPE]
45  ) && $integrationData[IntegrationModel::SETUP_TYPE] == IntegrationModel::TYPE_CONFIG;
46  }

◆ mapResources()

mapResources ( array  $resources)

Make ACL resource array compatible with jQuery jsTree component.

Parameters
array$resources
Returns
array

Definition at line 18 of file Data.php.

19  {
20  $output = [];
21  foreach ($resources as $resource) {
22  $item = [];
23  $item['attr']['data-id'] = $resource['id'];
24  $item['data'] = __($resource['title']);
25  $item['children'] = [];
26  if (isset($resource['children'])) {
27  $item['state'] = 'open';
28  $item['children'] = $this->mapResources($resource['children']);
29  }
30  $output[] = $item;
31  }
32  return $output;
33  }
__()
Definition: __.php:13
$resource
Definition: bulk.php:12
mapResources(array $resources)
Definition: Data.php:18

The documentation for this class was generated from the following file: