You are here

public function LayoutParagraphsLayout::getFieldName in Layout Paragraphs 2.0.x

Returns the field name.

Return value

string The field name.

3 calls to LayoutParagraphsLayout::getFieldName()
LayoutParagraphsLayout::id in src/LayoutParagraphsLayout.php
Returns a unique id for this layout.
LayoutParagraphsLayout::insertIntoRegion in src/LayoutParagraphsLayout.php
Insert a paragraph component before an existing component.
LayoutParagraphsLayout::insertSiblingComponent in src/LayoutParagraphsLayout.php
Insert an new item adjacent to $sibling.

File

src/LayoutParagraphsLayout.php, line 171

Class

LayoutParagraphsLayout
Provides a domain object for a complete Layout Paragraphs Layout.

Namespace

Drupal\layout_paragraphs

Code

public function getFieldName() {

  /** @var \Drupal\field\Entity\FieldConfig $definition **/
  $definition = $this->paragraphsReferenceField
    ->getFieldDefinition();
  $field_name = $definition
    ->get('field_name');
  return $field_name;
}