public static function Slick::getHtmlId in Slick Carousel 8
Same name and namespace in other branches
- 8.2 src/Entity/Slick.php \Drupal\slick\Entity\Slick::getHtmlId()
Returns the trusted HTML ID of a single slick instance.
@todo: Consider Blazy::getHtmlId() instead.
Return value
string The html ID.
3 calls to Slick::getHtmlId()
- SlickCrudTest::testSlickCrud in tests/
src/ Kernel/ SlickCrudTest.php - Tests CRUD operations for Slick optionsets.
- SlickManager::preRenderSlickWrapper in src/
SlickManager.php - template_preprocess_slick in templates/
slick.theme.inc - Prepares variables for slick.html.twig templates.
File
- src/
Entity/ Slick.php, line 329
Class
- Slick
- Defines the Slick configuration entity.
Namespace
Drupal\slick\EntityCode
public static function getHtmlId($string = 'slick', $id = '') {
if (!isset(static::$slickId)) {
static::$slickId = 0;
}
// Do not use dynamic Html::getUniqueId, otherwise broken asnavfors.
return empty($id) ? Html::getId($string . '-' . ++static::$slickId) : strip_tags($id);
}