final class EntityMock in Hook Event Dispatcher 8
Class EntityMock.
Hierarchy
- class \Drupal\Tests\hook_event_dispatcher\Unit\Preprocess\Helpers\EntityMock
Expanded class hierarchy of EntityMock
2 files declare their use of EntityMock
- EntityEventTest.php in tests/
src/ Unit/ Preprocess/ EntityEventTest.php - EntityEventVariablesTest.php in tests/
src/ Unit/ Preprocess/ EntityEventVariablesTest.php
File
- tests/
src/ Unit/ Preprocess/ Helpers/ EntityMock.php, line 8
Namespace
Drupal\Tests\hook_event_dispatcher\Unit\Preprocess\HelpersView source
final class EntityMock {
/**
* Entity type.
*
* @var string
*/
private $type;
/**
* Entity bundle.
*
* @var string
*/
private $bundle;
/**
* View mode.
*
* @var string
*/
private $viewMode;
/**
* EntityMock constructor.
*
* @param string $type
* Entity type.
* @param string $bundle
* Entity bundle.
* @param string $viewMode
* View mode.
*/
public function __construct($type, $bundle, $viewMode) {
$this->bundle = $bundle;
$this->type = $type;
$this->viewMode = $viewMode;
}
/**
* Get the entity type.
*
* @return string
* Type.
*/
public function getEntityType() {
return $this->type;
}
/**
* Get the entity bundle.
*
* @return string
* Bundle.
*/
public function bundle() {
return $this->bundle;
}
/**
* Get the view mode.
*
* @return string
* ViewMode.
*/
public function getViewMode() {
return $this->viewMode;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityMock:: |
private | property | Entity bundle. | |
EntityMock:: |
private | property | Entity type. | |
EntityMock:: |
private | property | View mode. | |
EntityMock:: |
public | function | Get the entity bundle. | |
EntityMock:: |
public | function | Get the entity type. | |
EntityMock:: |
public | function | Get the view mode. | |
EntityMock:: |
public | function | EntityMock constructor. |