public function EntityUsage::__construct in Entity Usage 8
Same name and namespace in other branches
- 8.4 src/EntityUsage.php \Drupal\entity_usage\EntityUsage::__construct()
- 8.2 src/EntityUsage.php \Drupal\entity_usage\EntityUsage::__construct()
- 8.3 src/EntityUsage.php \Drupal\entity_usage\EntityUsage::__construct()
Construct the EntityUsage object.
Parameters
\Drupal\Core\Database\Connection $connection: The database connection which will be used to store the entity usage information.
\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: An event dispatcher instance to use for events.
string $table: (optional) The table to store the entity usage info. Defaults to 'entity_usage'.
File
- src/
EntityUsage.php, line 49
Class
- EntityUsage
- Defines the entity usage base class.
Namespace
Drupal\entity_usageCode
public function __construct(Connection $connection, EventDispatcherInterface $event_dispatcher, $table = 'entity_usage') {
$this->connection = $connection;
$this->tableName = $table;
$this->eventDispatcher = $event_dispatcher;
}