You are here

public function CheeseburgerMenu::getIdAsAttribute in Cheeseburger Menu 5.0.x

Cheeseburger menu as attribute.

Return value

\Drupal\Core\Template\Attribute Menu id attribute.

File

src/CheeseburgerMenu.php, line 172

Class

CheeseburgerMenu
Cheeseburger menu class.

Namespace

Drupal\cheeseburger_menu

Code

public function getIdAsAttribute() {
  return new Attribute([
    'data-cheeseburger-id' => $this
      ->getId(),
  ]);
}