You are here

public function StorageHelper::exists in Menus attribute 8

Function to check existence of a menu in our table.

File

src/StorageHelper.php, line 46

Class

StorageHelper
Helper Class for database interaction.

Namespace

Drupal\menus_attribute

Code

public function exists($plugin_id) {
  $data = $this->db
    ->select('menus_attribute', 'ma')
    ->fields('ma')
    ->condition('plugin_id', $plugin_id, '=')
    ->execute()
    ->fetchField();
  return (bool) $data;
}