
| Current Path : /var/www/html1/testsite/web/themes/contrib/bootstrap/src/Plugin/Preprocess/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //var/www/html1/testsite/web/themes/contrib/bootstrap/src/Plugin/Preprocess/ProgressBar.php |
<?php
namespace Drupal\bootstrap\Plugin\Preprocess;
use Drupal\bootstrap\Utility\Variables;
use Drupal\Component\Utility\Html;
/**
* Pre-processes variables for the "progress_bar" theme hook.
*
* @ingroup plugins_preprocess
*
* @BootstrapPreprocess("progress_bar")
*/
class ProgressBar extends PreprocessBase implements PreprocessInterface {
/**
* {@inheritdoc}
*/
public function preprocessVariables(Variables $variables) {
// Ensure a unique ID, generating one if needed.
$id = $variables->getAttribute('id', Html::getUniqueId($variables->offsetGet('id', 'progress-bar')));
$variables->setAttribute('id', $id);
unset($variables['id']);
// Preprocess attributes.
$this->preprocessAttributes();
}
}