You are here

protected function Link::getConnection in Colossal Menu 8

Same name and namespace in other branches
  1. 2.x src/Entity/Link.php \Drupal\colossal_menu\Entity\Link::getConnection()

Get the database connection.

Return value

\Drupal\Core\Database\Connection The database connection.

1 call to Link::getConnection()
Link::postSave in src/Entity/Link.php
Update the link tree.

File

src/Entity/Link.php, line 585

Class

Link
Defines the Link entity.

Namespace

Drupal\colossal_menu\Entity

Code

protected function getConnection() {
  if (!$this->connection) {
    $this->connection = $this
      ->container()
      ->get('database');
  }
  return $this->connection;
}