public function MixitupViewsDefaultOptionsService::defaultOptions in MixItUp Views 8.2
Same name and namespace in other branches
- 8 src/MixitupViewsDefaultOptionsService.php \Drupal\mixitup_views\MixitupViewsDefaultOptionsService::defaultOptions()
Get default option for mixitup js.
Return value
array Array of default mixitup params.
File
- src/
MixitupViewsDefaultOptionsService.php, line 18
Class
- MixitupViewsDefaultOptionsService
- Class MixitupViewsDefaultOptions.
Namespace
Drupal\mixitup_viewsCode
public function defaultOptions($convert = FALSE) {
$options = [
'selectors' => [
'target' => '.mix',
'filter' => '.filter',
'sort' => '.sort',
],
'load' => [
'filter' => 'all',
'sort' => 'default:asc',
],
'animation' => [
'enable' => TRUE,
'effects' => 'fade scale',
'duration' => 600,
'easing' => 'ease',
'perspectiveDistance' => '3000px',
'perspectiveOrigin' => '50% 50%',
'queue' => TRUE,
'queueLimit' => 1,
],
'restrict' => [
'vocab' => FALSE,
'vocab_ids' => [],
],
];
if ($convert) {
$options = $this
->convertFromMixitupOptions($options);
}
return $options;
}