interface LibraryItemInterface

Provides an interface defining a paragraphs entity.

Hierarchy

  • interface \Drupal\paragraphs_library\LibraryItemInterface extends \Drupal\Core\Entity\ContentEntityInterface \Drupal\user\EntityOwnerInterface \Drupal\Core\Entity\EntityChangedInterface \Drupal\Core\Entity\RevisionLogInterface \Drupal\Core\Entity\EntityPublishedInterface

Expanded class hierarchy of LibraryItemInterface

All classes that implement LibraryItemInterface

3 files declare their use of LibraryItemInterface
LibraryItem.php in paragraphs/modules/paragraphs_library/src/Entity/LibraryItem.php
LibraryItemController.php in paragraphs/modules/paragraphs_library/src/Controller/LibraryItemController.php
LibraryItemRevisionRevertForm.php in paragraphs/modules/paragraphs_library/src/Form/LibraryItemRevisionRevertForm.php

File

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

Namespace

Drupal\paragraphs_library
View source
interface LibraryItemInterface extends ContentEntityInterface, EntityOwnerInterface, EntityChangedInterface, RevisionLogInterface, EntityPublishedInterface {

  /**
   * Creates a library entity from a paragraph entity.
   *
   * @param \Drupal\paragraphs\ParagraphInterface $paragraph
   *   The paragraph entity.
   *
   * @throws \Exception
   *   If a conversion is attempted for bundles that don't support it.
   *
   * @return static
   *   The library item entity.
   */
  public static function createFromParagraph(ParagraphInterface $paragraph);

  /**
   * Gets the library item creation timestamp.
   *
   * @return int
   *   Creation timestamp of the library item.
   */
  public function getCreatedTime();

  /**
   * Sets the library item creation timestamp.
   *
   * @param int $timestamp
   *   The library item creation timestamp.
   *
   * @return $this
   *   The called library item entity.
   */
  public function setCreatedTime($timestamp);

}

Members

Namesort descending Modifiers Type Description Overrides
LibraryItemInterface::createFromParagraph public static function Creates a library entity from a paragraph entity. 1
LibraryItemInterface::getCreatedTime public function Gets the library item creation timestamp. 1
LibraryItemInterface::setCreatedTime public function Sets the library item creation timestamp. 1