function bootstrap_field_carousel_defaults in Bootstrap Core 7.3
Helper function for returning the default values of a carousel object.
1 call to bootstrap_field_carousel_defaults()
- bootstrap_field_load_carousel in bootstrap_field/
includes/ carousel.inc - Helper function for retrieving Bootstrap Carousel slide items.
File
- bootstrap_field/
includes/ carousel.inc, line 12 - carousel.inc
Code
function bootstrap_field_carousel_defaults() {
static $defaults;
if (!isset($defaults)) {
$defaults = (object) array(
'fid' => 0,
'entity_id' => 0,
'entity_type' => '',
'entity_bundle' => '',
'settings' => array(
'title' => '',
'description' => '',
'url' => '',
'url_new_window' => 1,
),
);
}
// Clone the object, otherwise it will keep the changes made to it.
return clone $defaults;
}