class RelationshipFieldValueEvent in Entity Share 8.2
Same name and namespace in other branches
- 8.3 modules/entity_share_client/src/Event/RelationshipFieldValueEvent.php \Drupal\entity_share_client\Event\RelationshipFieldValueEvent
- 8 modules/entity_share_client/src/Event/RelationshipFieldValueEvent.php \Drupal\entity_share_client\Event\RelationshipFieldValueEvent
Defines a RelationshipFieldValueEvent event.
Hierarchy
- class \Drupal\entity_share_client\Event\RelationshipFieldValueEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of RelationshipFieldValueEvent
2 files declare their use of RelationshipFieldValueEvent
- EntityReferenceRevisionsRelationshipSubscriber.php in modules/
entity_share_client/ src/ EventSubscriber/ EntityReferenceRevisionsRelationshipSubscriber.php - JsonapiHelper.php in modules/
entity_share_client/ src/ Service/ JsonapiHelper.php
File
- modules/
entity_share_client/ src/ Event/ RelationshipFieldValueEvent.php, line 13
Namespace
Drupal\entity_share_client\EventView source
class RelationshipFieldValueEvent extends Event {
const EVENT_NAME = 'entity_share_client.relationship_field_value';
/**
* A FieldItemList object.
*
* @var \Drupal\Core\Field\FieldItemListInterface
*/
protected $field;
/**
* An array of the field value to alter.
*
* @var array
*/
protected $fieldValue;
/**
* Constructs a new RelationshipFieldValueEvent.
*
* @param \Drupal\Core\Field\FieldItemListInterface $field
* A FieldItemList object.
* @param array $field_value
* An array of the field value to alter.
*/
public function __construct(FieldItemListInterface $field, array $field_value) {
$this->field = $field;
$this->fieldValue = $field_value;
}
/**
* Returns the FieldItemList object.
*
* @return \Drupal\Core\Field\FieldItemListInterface
* Returns the FieldItemList object.
*/
public function getField() {
return $this->field;
}
/**
* Returns the field value.
*
* @return array
* Returns the field value.
*/
public function getFieldValue() {
return $this->fieldValue;
}
/**
* Set the field value.
*
* @param array $field_value
* The field value.
*/
public function setFieldValue(array $field_value) {
$this->fieldValue = $field_value;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RelationshipFieldValueEvent:: |
protected | property | A FieldItemList object. | |
RelationshipFieldValueEvent:: |
protected | property | An array of the field value to alter. | |
RelationshipFieldValueEvent:: |
constant | |||
RelationshipFieldValueEvent:: |
public | function | Returns the FieldItemList object. | |
RelationshipFieldValueEvent:: |
public | function | Returns the field value. | |
RelationshipFieldValueEvent:: |
public | function | Set the field value. | |
RelationshipFieldValueEvent:: |
public | function | Constructs a new RelationshipFieldValueEvent. |