You are here

function bootstrap_element_smart_description in Express 8

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.

See also

\Drupal\bootstrap\Utility\Element::smartDescription()

File

themes/contrib/bootstrap/deprecated.php, line 662
This contains deprecated functions that will be removed in a future release.

Code

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);
}