You are here

function beautytips_manager_get_custom_style in BeautyTips 8

Same name and namespace in other branches
  1. 7.2 beautytips_manager.module \beautytips_manager_get_custom_style()

Grab a custom style from the database.

2 calls to beautytips_manager_get_custom_style()
CustomStylesDeleteForm::buildForm in beautytips_manager/src/Form/CustomStylesDeleteForm.php
Form constructor.
CustomStylesEditForm::buildForm in beautytips_manager/src/Form/CustomStylesEditForm.php
Form constructor.

File

beautytips_manager/beautytips_manager.module, line 297
Code related to defining and displaying custom beautytips and styles.

Code

function beautytips_manager_get_custom_style($id) {
  $sql = "SELECT * FROM {beautytips_custom_styles} WHERE id = :id";
  $result = \Drupal::database()
    ->query($sql, [
    ':id' => $id,
  ]);
  return $result
    ->fetchObject();
}