You are here

public function SimpleMegaMenuStorage::userRevisionIds in Simple Mega Menu 2.0.x

Same name and namespace in other branches
  1. 8 src/SimpleMegaMenuStorage.php \Drupal\simple_megamenu\SimpleMegaMenuStorage::userRevisionIds()

Gets a list of revision IDs having a given user as Simple mega menu author.

Parameters

\Drupal\Core\Session\AccountInterface $account: The user entity.

Return value

int[] Simple mega menu revision IDs (in ascending order).

Overrides SimpleMegaMenuStorageInterface::userRevisionIds

File

src/SimpleMegaMenuStorage.php, line 33

Class

SimpleMegaMenuStorage
Defines the storage handler class for Simple mega menu entities.

Namespace

Drupal\simple_megamenu

Code

public function userRevisionIds(AccountInterface $account) {
  return $this->database
    ->query('SELECT vid FROM {simple_mega_menu_field_revision} WHERE uid = :uid ORDER BY vid', [
    ':uid' => $account
      ->id(),
  ])
    ->fetchCol();
}