abstract class ParentEntityReactionBase in Entity Reference Hierarchy 3.x
Same name and namespace in other branches
- 8.2 src/Storage/ParentEntityReactionBase.php \Drupal\entity_hierarchy\Storage\ParentEntityReactionBase
Defines a base class for reacting to parent entity updates.
Hierarchy
- class \Drupal\entity_hierarchy\Storage\ParentEntityReactionBase implements ContainerInjectionInterface uses TreeLockTrait
Expanded class hierarchy of ParentEntityReactionBase
File
- src/
Storage/ ParentEntityReactionBase.php, line 12
Namespace
Drupal\entity_hierarchy\StorageView source
abstract class ParentEntityReactionBase implements ContainerInjectionInterface {
use TreeLockTrait;
/**
* Nested set storage.
*
* @var \Drupal\entity_hierarchy\Storage\NestedSetStorageFactory
*/
protected $nestedSetStorageFactory;
/**
* Node key factory.
*
* @var \Drupal\entity_hierarchy\Storage\NestedSetNodeKeyFactory
*/
protected $nodeKeyFactory;
/**
* Parent candidate interface.
*
* @var \Drupal\entity_hierarchy\Information\ParentCandidateInterface
*/
protected $parentCandidate;
/**
* Constructs a new ParentEntityRevisionUpdater object.
*
* @param \Drupal\entity_hierarchy\Storage\NestedSetStorageFactory $nestedSetStorageFactory
* Nested set storage factory.
* @param \Drupal\entity_hierarchy\Storage\NestedSetNodeKeyFactory $nodeKeyFactory
* Node key factory.
* @param \Drupal\entity_hierarchy\Information\ParentCandidateInterface $parentCandidate
* Parent candidate service.
*/
public function __construct(NestedSetStorageFactory $nestedSetStorageFactory, NestedSetNodeKeyFactory $nodeKeyFactory, ParentCandidateInterface $parentCandidate) {
$this->nestedSetStorageFactory = $nestedSetStorageFactory;
$this->nodeKeyFactory = $nodeKeyFactory;
$this->parentCandidate = $parentCandidate;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return (new static($container
->get('entity_hierarchy.nested_set_storage_factory'), $container
->get('entity_hierarchy.nested_set_node_factory'), $container
->get('entity_hierarchy.information.parent_candidate')))
->setLockBackend($container
->get('lock'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ParentEntityReactionBase:: |
protected | property | Nested set storage. | |
ParentEntityReactionBase:: |
protected | property | Node key factory. | |
ParentEntityReactionBase:: |
protected | property | Parent candidate interface. | |
ParentEntityReactionBase:: |
public static | function |
Instantiates a new instance of this class. Overrides ContainerInjectionInterface:: |
1 |
ParentEntityReactionBase:: |
public | function | Constructs a new ParentEntityRevisionUpdater object. | 1 |
TreeLockTrait:: |
protected | property | Lock backend. | |
TreeLockTrait:: |
protected | function | Gets lock name. | |
TreeLockTrait:: |
protected | function | Gets lock backend. | |
TreeLockTrait:: |
protected | function | Locks tree. | |
TreeLockTrait:: |
protected | function | Releases lock. | |
TreeLockTrait:: |
public | function | Sets lock backend. |