public function SlickAdmin::mediaSwitchForm in Slick Carousel 8.2
Same name and namespace in other branches
- 8 src/Form/SlickAdmin.php \Drupal\slick\Form\SlickAdmin::mediaSwitchForm()
- 7.3 src/Form/SlickAdmin.php \Drupal\slick\Form\SlickAdmin::mediaSwitchForm()
Returns the image formatter form elements.
1 call to SlickAdmin::mediaSwitchForm()
- SlickAdmin::buildSettingsForm in src/
Form/ SlickAdmin.php - Returns the main form elements.
File
- src/
Form/ SlickAdmin.php, line 247
Class
- SlickAdmin
- Provides resusable admin functions, or form elements.
Namespace
Drupal\slick\FormCode
public function mediaSwitchForm(array &$form, $definition = []) {
$this->blazyAdmin
->mediaSwitchForm($form, $definition);
if (isset($form['media_switch'])) {
$form['media_switch']['#description'] = $this
->t('Depends on the enabled supported modules, or has known integration with Slick.<ol><li>Link to content: for aggregated small slicks.</li><li>Image to iframe: audio/video is hidden below image until toggled, otherwise iframe is always displayed, and draggable fails. Aspect ratio applies.</li><li>Colorbox.</li><li>Photobox. Be sure to select "Thumbnail style" for the overlay thumbnails.</li><li>Intense: image to fullscreen intense image.</li>');
if (!empty($definition['multimedia']) && isset($definition['fieldable_form'])) {
$form['media_switch']['#description'] .= ' ' . $this
->t('<li>Image rendered by its formatter: image-related settings here will be ignored: breakpoints, image style, CSS background, aspect ratio, lazyload, etc. Only choose if needing a special image formatter such as Image Link Formatter.</li>');
}
$form['media_switch']['#description'] .= ' ' . $this
->t('</ol> Try selecting "<strong>- None -</strong>" first before changing if trouble with this complex form states.');
}
if (isset($form['ratio']['#description'])) {
$form['ratio']['#description'] .= ' ' . $this
->t('Required if using media entity to switch between iframe and overlay image, otherwise DIY.');
}
}