public function SlickAdmin::imageStyleForm in Slick Carousel 7.3
Same name and namespace in other branches
- 8.2 src/Form/SlickAdmin.php \Drupal\slick\Form\SlickAdmin::imageStyleForm()
- 8 src/Form/SlickAdmin.php \Drupal\slick\Form\SlickAdmin::imageStyleForm()
Returns the image formatter form elements.
Overrides BlazyAdminFormatterBase::imageStyleForm
1 call to SlickAdmin::imageStyleForm()
- SlickAdmin::buildSettingsForm in src/
Form/ SlickAdmin.php - Returns the main form elements.
File
- src/
Form/ SlickAdmin.php, line 210
Class
- SlickAdmin
- Provides resusable admin functions, or form elements.
Namespace
Drupal\slick\FormCode
public function imageStyleForm(array &$form, $definition = []) {
$definition['thumbnail_style'] = isset($definition['thumbnail_style']) ? $definition['thumbnail_style'] : TRUE;
$definition['ratios'] = isset($definition['ratios']) ? $definition['ratios'] : TRUE;
$definition['thumbnail_effect'] = [
'hover' => t('Hoverable'),
'grid' => t('Static grid'),
];
if (!isset($form['image_style'])) {
parent::imageStyleForm($form, $definition);
$form['image_style']['#description'] = t('The main image style. This will be treated as the fallback image, which is normally smaller, if Breakpoints are provided, and if <strong>Use CSS background</strong> is disabled. Otherwise this is the only image displayed. Ignored by Responsive image option.');
}
if (isset($form['thumbnail_style'])) {
$form['thumbnail_style']['#description'] = t('Usages: <ol><li>If <em>Optionset thumbnail</em> provided, it is for asNavFor thumbnail navigation.</li><li>For <em>Thumbnail effect</em>.</li><li>Photobox thumbnail.</li><li>Custom work via the provided data-thumb attributes: arrows with thumbnails, Photoswipe thumbnail, etc.</li></ol>Leave empty to not use thumbnails.');
}
if (isset($form['thumbnail_effect'])) {
$form['thumbnail_effect']['#description'] = t('Dependent on a Skin, Dots and Thumbnail style options. No asnavfor/ Optionset thumbnail is needed. <ol><li><strong>Hoverable</strong>: Dots pager are kept, and thumbnail will be hidden and only visible on dot mouseover, default to min-width 120px.</li><li><strong>Static grid</strong>: Dots are hidden, and thumbnails are displayed as a static grid acting like dots pager.</li></ol>Alternative to asNavFor aka separate thumbnails as slider.');
}
if (isset($form['background'])) {
$form['background']['#description'] .= ' ' . t('Works best with a single visible slide, skins full width/screen.');
}
}