Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
FieldsetPool Class Reference

Public Member Functions

 __construct (ObjectManagerInterface $objectManager)
 
 get ($fieldsetClass)
 

Protected Attributes

 $objectManager
 

Detailed Description

@api Retrieve Fieldset when implementing custom Indexer\Action

Since
100.0.2

Definition at line 14 of file FieldsetPool.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( ObjectManagerInterface  $objectManager)
Parameters
ObjectManagerInterface$objectManager

Definition at line 24 of file FieldsetPool.php.

25  {
26  $this->objectManager = $objectManager;
27  }

Member Function Documentation

◆ get()

get (   $fieldsetClass)

Get fieldset class instance

Parameters
string$fieldsetClass
Exceptions

Definition at line 36 of file FieldsetPool.php.

37  {
38  $handler = $this->objectManager->get($fieldsetClass);
39  if (!$handler instanceof FieldsetInterface) {
40  throw new \InvalidArgumentException(
41  $fieldsetClass . ' doesn\'t implement \Magento\Framework\Indexer\FieldsetInterface'
42  );
43  }
44  return $handler;
45  }
catch(\Exception $e) $handler
Definition: index.php:30

Field Documentation

◆ $objectManager

$objectManager
protected

Definition at line 19 of file FieldsetPool.php.


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