interface LinkedFieldManagerInterface in Linked Field 8
Interface LinkedFieldManagerInterface.
@package Drupal\linked_field
Hierarchy
- interface \Drupal\linked_field\LinkedFieldManagerInterface
Expanded class hierarchy of LinkedFieldManagerInterface
All classes that implement LinkedFieldManagerInterface
File
- src/
LinkedFieldManagerInterface.php, line 14
Namespace
Drupal\linked_fieldView source
interface LinkedFieldManagerInterface {
/**
* Get list of blacklisted field types.
*
* @return array
* An array containing blacklisted field types.
*/
public function getFieldTypeBlacklist();
/**
* Get configured attributes from configuration.
*
* @return array
* An array of the configured attributes.
*/
public function getAttributes();
/**
* Get allowed destination fields.
*
* @param string $entity_type_id
* The entity type ID.
* @param string $bundle_id
* The bundle ID.
*
* @return array
* An array containing the field names keyed by their machine name.
*/
public function getDestinationFields($entity_type_id, $bundle_id);
/**
* Get Linked Field display settings for a given entity.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity being viewed.
* @param string $view_mode
* The name of the view mode.
* @param string $field_name
* The name of the field.
*
* @deprecated No longer used by internal code and not recommended.
*
* @return array
* Getting linked field display settings.
*/
public function getDisplaySettings(EntityInterface $entity, $view_mode, $field_name);
/**
* Get display settings for a given field.
*
* @param \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display
* The entity view display.
* @param string $field_name
* The field name.
*
* @return array
* Getting display settings.
*/
public function getFieldDisplaySettings(EntityViewDisplayInterface $display, $field_name);
/**
* Get the destination for a set field or custom text.
*
* @param string $type
* The type of the destination, either 'field' or 'custom'.
* @param string $value
* The value of the destination.
* @param array $context
* An array of context information.
*
* @return string
* Getting the destination.
*/
public function getDestination($type, $value, array $context);
/**
* Build the final destination URL.
*
* @param string $destination
* The destination.
*
* @return false|string
* Either FALSE or the destination URL.
*/
public function buildDestinationUrl($destination);
/**
* Get the URI from field value.
*
* @param \Drupal\Core\Field\FieldItemListInterface $field_items
* The field item list.
*
* @return string
* The value of the first field item.
*/
public function getFieldValue(FieldItemListInterface $field_items);
/**
* Replace token in text.
*
* @param string $text
* The text with tokens included.
* @param array $data
* Additional context information.
* @param array $options
* An options array for the token replacement.
*
* @return string
* String with tokens.
*/
public function replaceToken($text, array $data = [], array $options = []);
/**
* Link a DOM node.
*
* @param \DOMNode $node
* An object which gets investigated.
* @param \DOMDocument $dom
* An object which represents an entire HTML or XML document.
* @param array $attributes
* An array containing element attributes.
*/
public function linkNode(\DOMNode $node, \DOMDocument $dom, array $attributes);
/**
* Link HTML code with set link attributes.
*
* @param string $html
* The list of HTML.
* @param array $attributes
* An associative array of attributes.
*
* @return string
* Linking the html code.
*/
public function linkHtml($html, array $attributes);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LinkedFieldManagerInterface:: |
public | function | Build the final destination URL. | 1 |
LinkedFieldManagerInterface:: |
public | function | Get configured attributes from configuration. | 1 |
LinkedFieldManagerInterface:: |
public | function | Get the destination for a set field or custom text. | 1 |
LinkedFieldManagerInterface:: |
public | function | Get allowed destination fields. | 1 |
LinkedFieldManagerInterface:: |
public | function | Get Linked Field display settings for a given entity. | 1 |
LinkedFieldManagerInterface:: |
public | function | Get display settings for a given field. | 1 |
LinkedFieldManagerInterface:: |
public | function | Get list of blacklisted field types. | 1 |
LinkedFieldManagerInterface:: |
public | function | Get the URI from field value. | 1 |
LinkedFieldManagerInterface:: |
public | function | Link HTML code with set link attributes. | 1 |
LinkedFieldManagerInterface:: |
public | function | Link a DOM node. | 1 |
LinkedFieldManagerInterface:: |
public | function | Replace token in text. | 1 |