function bootstrap_element_smart_description

8 deprecated.php bootstrap_element_smart_description(array &$element, array &$target = NULL, $input_only = TRUE, $length = NULL)
7 common.inc bootstrap_element_smart_description(&$element, &$target = NULL, $input_only = TRUE, $length = NULL)

Converts an element description into a tooltip based on certain criteria.

  // Before.
  bootstrap_element_smart_description($element, $target, $input_only, $length);

  // After.
  use Drupal\bootstrap\Utility\Element;
  Element::create($element)->smartDescription($target, $input_only, $length);

Parameters

array $element: An element render array, passed by reference.

array $target: The target element render array the tooltip is to be attached to, passed by reference. If not set, it will default to the $element passed.

bool $input_only: Toggle determining whether or not to only convert input elements.

int $length: The length of characters to determine if description is "simple".

Deprecated

Will be removed in a future release.

Source ./deprecated.php (line 662)

function bootstrap_element_smart_description(array &$element, array &$target = NULL, $input_only = TRUE, $length = NULL) {
  Bootstrap::deprecated();
  Element::create($element)->smartDescription($target, $input_only, $length);
}