interface StorageManagerInterface in Paragraph View Mode 2.x
Same name and namespace in other branches
- 8 src/StorageManagerInterface.php \Drupal\paragraph_view_mode\StorageManagerInterface
Provides an interface for managing the storage.
@package Drupal\paragraph_view_mode
Hierarchy
- interface \Drupal\paragraph_view_mode\StorageManagerInterface
Expanded class hierarchy of StorageManagerInterface
All classes that implement StorageManagerInterface
2 files declare their use of StorageManagerInterface
- ParagraphViewModeWidget.php in src/
Plugin/ Field/ FieldWidget/ ParagraphViewModeWidget.php - paragraph_view_mode.module in ./
paragraph_view_mode.module - Contains paragraphs_view_mode.module functions.
File
- src/
StorageManagerInterface.php, line 10
Namespace
Drupal\paragraph_view_modeView source
interface StorageManagerInterface {
/**
* Entity type name.
*/
const ENTITY_TYPE = 'paragraph';
/**
* Module configuration name.
*/
const CONFIG_NAME = 'paragraph_view_mode';
/**
* View mode field name.
*/
const FIELD_NAME = SELF::CONFIG_NAME;
/**
* View mode field type.
*/
const FIELD_TYPE = SELF::FIELD_NAME;
/**
* View mode field label.
*/
const FIELD_LABEL = 'Paragraph view mode';
/**
* Add field to the given bundle.
*
* @param string $bundle
* Paragraph entity bundle.
*
* @return bool
* True if the field exist or was created successfully.
*/
public function addField(string $bundle) : bool;
/**
* Delete field from the given bundle.
*
* @param string $bundle
* Paragraph entity bundle.
*
* @return bool
* True if the field does not exist or was successfully deleted.
*/
public function deleteField(string $bundle) : bool;
/**
* Sets field label.
*
* @param string $bundle
* Paragraph entity bundle.
*
* @param string $label
* Label.
*
* @throws \Drupal\Core\Entity\EntityStorageException
*/
public function setFieldLabel(string $bundle, string $label) : void;
/**
* Add paragraph view mode field to paragraph entity form display.
*
* @param string $bundle
* Paragraph entity bundle.
* @param string $form_mode
* Form mode machine name.
*/
public function addToFormDisplay(string $bundle, string $form_mode = 'default') : void;
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
StorageManagerInterface:: |
public | function | Add field to the given bundle. | 1 |
StorageManagerInterface:: |
public | function | Add paragraph view mode field to paragraph entity form display. | 1 |
StorageManagerInterface:: |
constant | Module configuration name. | ||
StorageManagerInterface:: |
public | function | Delete field from the given bundle. | 1 |
StorageManagerInterface:: |
constant | Entity type name. | ||
StorageManagerInterface:: |
constant | View mode field label. | ||
StorageManagerInterface:: |
constant | View mode field name. | ||
StorageManagerInterface:: |
constant | View mode field type. | ||
StorageManagerInterface:: |
public | function | Sets field label. | 1 |