You are here

elevatezoomplus.elevatezoomplus_optionset.inc in ElevateZoom Plus 7

ElevateZoomPlus default optionset API include file.

File

elevatezoomplus.elevatezoomplus_optionset.inc
View source
<?php

/**
 * @file
 * ElevateZoomPlus default optionset API include file.
 */
use Drupal\elevatezoomplus\Entity\ElevateZoomPlus;

/**
 * Implements hook_elevatezoomplus_optionsets().
 */
function elevatezoomplus_elevatezoomplus_optionsets() {
  $optionsets = [];
  $values = ElevateZoomPlus::defaultProperties();
  $optionset = ElevateZoomPlus::create($values);
  $optionset->disabled = TRUE;
  $optionset->api_version = 1;
  $optionsets['default'] = $optionset;
  $optionset = new ElevateZoomPlus();
  $optionset->disabled = FALSE;
  $optionset->api_version = 1;
  $optionset->name = 'inner';
  $optionset->label = 'Inner';
  $optionset->options = [
    'settings' => [
      'lensShape' => 'round',
      'zoomType' => 'inner',
    ],
  ];
  $optionsets['inner'] = $optionset;
  $optionset = new ElevateZoomPlus();
  $optionset->disabled = FALSE;
  $optionset->api_version = 1;
  $optionset->name = 'lens';
  $optionset->label = 'Lens';
  $optionset->options = [
    'settings' => [
      'zoomType' => 'lens',
      'lensShape' => 'round',
    ],
  ];
  $optionsets['lens'] = $optionset;
  $optionset = new ElevateZoomPlus();
  $optionset->disabled = FALSE;
  $optionset->api_version = 1;
  $optionset->name = 'responsive';
  $optionset->label = 'Responsive';
  $optionset->options = [
    'settings' => [
      'responsive' => TRUE,
      'zoomType' => 'inner',
      'lensShape' => 'round',
      'tint' => TRUE,
      'tintColour' => '#0F0',
      'tintOpacity' => 0.5,
      'respond' => [
        0 => [
          'range' => '100-599',
          'enabled' => FALSE,
          'showLens' => FALSE,
        ],
        1 => [
          'range' => '600-799',
          'enabled' => TRUE,
          'zoomWindowWidth' => 100,
          'zoomWindowHeight' => 100,
          'tintColour' => '#F00',
        ],
        2 => [
          'range' => '800-1199',
          'enabled' => TRUE,
          'zoomWindowWidth' => 200,
          'zoomWindowHeight' => 200,
          'tintColour' => '#00F',
        ],
      ],
    ],
  ];
  $optionsets['responsive'] = $optionset;
  return $optionsets;
}

Functions

Namesort descending Description
elevatezoomplus_elevatezoomplus_optionsets Implements hook_elevatezoomplus_optionsets().