public static function LibraryItemInterface::createFromParagraph

Creates a library entity from a paragraph entity.

Parameters

\Drupal\paragraphs\ParagraphInterface $paragraph: The paragraph entity.

Return value

static The library item entity.

Throws

\Exception If a conversion is attempted for bundles that don't support it.

1 method overrides LibraryItemInterface::createFromParagraph()
LibraryItem::createFromParagraph in paragraphs/modules/paragraphs_library/src/Entity/LibraryItem.php
Creates a library entity from a paragraph entity.

File

paragraphs/modules/paragraphs_library/src/LibraryItemInterface.php, line 29

Class

LibraryItemInterface
Provides an interface defining a paragraphs entity.

Namespace

Drupal\paragraphs_library

Code

public static function createFromParagraph(ParagraphInterface $paragraph);