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

Public Member Functions

 __construct (string $name, array $fields, array $interfaces, string $description)
 
 getName ()
 
 getFields ()
 
 getInterfaces ()
 
 getDescription ()
 

Detailed Description

Describes all the configured data of an Output or Input type in GraphQL.

Definition at line 13 of file Type.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( string  $name,
array  $fields,
array  $interfaces,
string  $description 
)
Parameters
string$name
Field[]$fields
string[]$interfaces
string$description

Definition at line 41 of file Type.php.

46  {
47  $this->name = $name;
48  $this->fields = $fields;
49  $this->interfaces = $interfaces;
50  $this->description = $description;
51  }

Member Function Documentation

◆ getDescription()

getDescription ( )

Get a human-readable description of the type.

Returns
string

Implements ConfigElementInterface.

Definition at line 88 of file Type.php.

88  : string
89  {
90  return $this->description;
91  }

◆ getFields()

getFields ( )

Get a list of fields that make up the possible return or input values of a type.

Returns
Field[]

Implements TypeInterface.

Definition at line 68 of file Type.php.

68  : array
69  {
70  return $this->fields;
71  }

◆ getInterfaces()

getInterfaces ( )

Get interfaces the type implements, if any. Return an empty array if none are configured.

Returns
string[]

Definition at line 78 of file Type.php.

78  : array
79  {
80  return $this->interfaces;
81  }

◆ getName()

getName ( )

Get the type name.

Returns
string

Implements ConfigElementInterface.

Definition at line 58 of file Type.php.

58  : string
59  {
60  return $this->name;
61  }

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