use App\Fields\FluidbookLinkEditor\Depth;
use App\Fields\FluidbookLinkEditor\LinkType;
+use App\Fields\FluidbookLinkEditor\MultimediaIntegration;
use Cubist\Backpack\Magic\Fields\FormSection;
use Cubist\Backpack\Magic\Fields\Number;
use Cubist\Backpack\Magic\Fields\Text;
const FLIPCARD = 41;
protected $_displayedOnFluidbook = true;
+ protected $_integration = false;
+ protected $_multimedia = false;
/**
* @return array[]
public static function types()
{
return [
- ['type' => self::WEB_INFOS, 'label' => __('Lien web « plus d\'infos »'), 'color' => '#ff0000'],
- ['type' => self::WEB, 'label' => __('Lien web'), 'color' => '#3399cc'],
- ['type' => self::EMAIL, 'label' => __('Adresse e-mail'), 'color' => '#6c6360'],
- ['type' => self::VIDEO, 'label' => __('Vidéo'), 'color' => '#33ff00'],
- ['type' => self::INTERNAL, 'label' => __('Lien vers une page'), 'color' => '#c7b405'],
- ['type' => self::MULTIMEDIA, 'label' => __('Multimédia'), 'color' => '#ff00ff'],
- ['type' => self::CUSTOM, 'label' => __('Lien personnalisé'), 'color' => '#14511a'],
- ['type' => self::PAGE_CORNER, 'label' => __('Coin de page'), 'color' => '#f19043', 'disabled' => true],
- ['type' => self::OBJECT3D, 'label' => __('Objet 3D'), 'color' => '#00ffff', 'disabled' => true],
- ['type' => self::WEBVIDEO, 'label' => __('Vidéo web'), 'color' => '#ffff00'],
- ['type' => self::ACTION, 'label' => __('Action'), 'color' => '#880000'],
- ['type' => self::CART, 'label' => __('Panier'), 'color' => '#F2A4B7'],
- ['type' => self::ZOOM, 'label' => __('Zone de zoom'), 'color' => '#322280'],
- ['type' => self::COLOR, 'label' => __('Couleurs'), 'color' => '#8C5E24'],
- ['type' => self::IMAGE, 'label' => __('Image'), 'color' => '#BE418D'],
- ['type' => self::FILE, 'label' => __('Fichier'), 'color' => '#F19043'],
- ['type' => self::AUDIO, 'label' => __('Audio'), 'color' => '#0065AE'],
- ['type' => self::TOOLTIP, 'label' => __('Texte / Infobulle'), 'color' => '#000000'],
- ['type' => self::CALL, 'label' => __('Appel'), 'color' => '#333333'],
- ['type' => self::BOOKMARKGROUP, 'label' => __('Groupe de marque-pages'), 'color' => '#d6520f'],
- ['type' => self::HTML5MULTIMEDIA, 'label' => __('Lien Multimédia (HTML)'), 'color' => '#34A853', 'disabled' => true],
- ['type' => self::BOOKMARK_CORNER, 'label' => __('Lien marque-page sur coin de page'), 'color' => '#000000', 'disabled' => true],
- ['type' => self::STATSTAG, 'label' => __('Tag statistique'), 'color' => '#000000'],
- ['type' => self::PHONE, 'label' => __('Téléphone'), 'color' => '#000000'],
- ['type' => self::AUDIODESCRIPTION, 'label' => __('Audiodescription'), 'color' => '#00535b'],
- ['type' => self::PAGE_LABEL, 'label' => __('Label de page'), 'color' => '#00E6D7'],
- ['type' => self::EVENT_OVERLAY, 'label' => __('Capter les évenements'), 'color' => '#ffcc00'],
- ['type' => self::ARTICLE, 'label' => __('Article (définition)'), 'color' => '#ACC152'],
- ['type' => self::LIKE, 'label' => __('Like'), 'color' => '#4267B2'],
- ['type' => self::SLIDESHOW, 'label' => __('Diaporama'), 'color' => '#07b57a'],
- ['type' => self::IFRAME, 'label' => __('iFrame'), 'color' => '#fcae25'],
- ['type' => self::SHOWLINK, 'label' => __('Afficher un lien'), 'color' => '#125C70'],
- ['type' => self::ZOOMHD, 'label' => __('Zoom HD'), 'color' => '#E80C95'],
- ['type' => self::LOCK_CONTENTS, 'label' => __('Blocage des contenus'), 'color' => '#69D670'],
- ['type' => self::TEXT, 'label' => __('Texte'), 'color' => '#9090FF'],
- ['type' => self::ARTICLE_OPEN, 'label' => __('Afficher un article'), 'color' => '#ffcc00'],
- ['type' => self::DOWNLOAD_PORTION, 'label' => __('Télécharger un extrait'), 'color' => '#AAAAAA'],
- ['type' => self::TRIGGERSLINK, 'label' => __('Déclencher un lien'), 'color' => '#cc0000'],
- ['type' => self::LAYER, 'label' => __('Animation de calque'), 'color' => '#3D0254'],
- ['type' => self::ANCHOR, 'label' => __('Ancre'), 'color' => '#330000'],
- ['type' => self::FLIPCARD, 'label' => __('Flipcard'), 'color' => '#460e3f'],
-
+ ['type' => self::WEB_INFOS, 'label' => __('Lien web « plus d\'infos »'), 'color' => '#ff0000', 'class' => WebInfos::class, 'class' => Web::class],
+ ['type' => self::WEB, 'label' => __('Lien web'), 'color' => '#3399cc', 'class' => Web::class, 'class' => Web::class],
+ ['type' => self::EMAIL, 'label' => __('Adresse e-mail'), 'color' => '#6c6360', 'class' => Web::class],
+ ['type' => self::VIDEO, 'label' => __('Vidéo'), 'color' => '#33ff00', 'class' => Web::class],
+ ['type' => self::INTERNAL, 'label' => __('Lien vers une page'), 'color' => '#c7b405', 'class' => Web::class],
+ ['type' => self::MULTIMEDIA, 'label' => __('Multimédia'), 'color' => '#ff00ff', 'class' => Web::class],
+ ['type' => self::CUSTOM, 'label' => __('Lien personnalisé'), 'color' => '#14511a', 'class' => Web::class],
+ ['type' => self::PAGE_CORNER, 'label' => __('Coin de page'), 'color' => '#f19043', 'disabled' => true, 'class' => Web::class],
+ ['type' => self::OBJECT3D, 'label' => __('Objet 3D'), 'color' => '#00ffff', 'disabled' => true, 'class' => Web::class],
+ ['type' => self::WEBVIDEO, 'label' => __('Vidéo web'), 'color' => '#ffff00', 'class' => Web::class],
+ ['type' => self::ACTION, 'label' => __('Action'), 'color' => '#880000', 'class' => Web::class],
+ ['type' => self::CART, 'label' => __('Panier'), 'color' => '#F2A4B7', 'class' => Web::class],
+ ['type' => self::ZOOM, 'label' => __('Zone de zoom'), 'color' => '#322280', 'class' => Web::class],
+ ['type' => self::COLOR, 'label' => __('Couleurs'), 'color' => '#8C5E24', 'class' => Web::class],
+ ['type' => self::IMAGE, 'label' => __('Image'), 'color' => '#BE418D', 'class' => Web::class],
+ ['type' => self::FILE, 'label' => __('Fichier'), 'color' => '#F19043', 'class' => Web::class],
+ ['type' => self::AUDIO, 'label' => __('Audio'), 'color' => '#0065AE', 'class' => Web::class],
+ ['type' => self::TOOLTIP, 'label' => __('Texte / Infobulle'), 'color' => '#000000', 'class' => Web::class],
+ ['type' => self::CALL, 'label' => __('Appel'), 'color' => '#333333', 'class' => Web::class],
+ ['type' => self::BOOKMARKGROUP, 'label' => __('Groupe de marque-pages'), 'color' => '#d6520f', 'class' => Web::class],
+ ['type' => self::HTML5MULTIMEDIA, 'label' => __('Lien Multimédia (HTML)'), 'color' => '#34A853', 'disabled' => true, 'class' => Web::class],
+ ['type' => self::BOOKMARK_CORNER, 'label' => __('Lien marque-page sur coin de page'), 'color' => '#000000', 'disabled' => true, 'class' => Web::class],
+ ['type' => self::STATSTAG, 'label' => __('Tag statistique'), 'color' => '#000000', 'class' => Web::class],
+ ['type' => self::PHONE, 'label' => __('Téléphone'), 'color' => '#000000', 'class' => Web::class],
+ ['type' => self::AUDIODESCRIPTION, 'label' => __('Audiodescription'), 'color' => '#00535b', 'class' => Web::class],
+ ['type' => self::PAGE_LABEL, 'label' => __('Label de page'), 'color' => '#00E6D7', 'class' => Web::class],
+ ['type' => self::EVENT_OVERLAY, 'label' => __('Capter les évenements'), 'color' => '#ffcc00', 'class' => Web::class],
+ ['type' => self::ARTICLE, 'label' => __('Article (définition)'), 'color' => '#ACC152', 'class' => Web::class],
+ ['type' => self::LIKE, 'label' => __('Like'), 'color' => '#4267B2', 'class' => Web::class],
+ ['type' => self::SLIDESHOW, 'label' => __('Diaporama'), 'color' => '#07b57a', 'class' => Web::class],
+ ['type' => self::IFRAME, 'label' => __('iFrame'), 'color' => '#fcae25', 'class' => Web::class],
+ ['type' => self::SHOWLINK, 'label' => __('Afficher un lien'), 'color' => '#125C70', 'class' => Web::class],
+ ['type' => self::ZOOMHD, 'label' => __('Zoom HD'), 'color' => '#E80C95', 'class' => Web::class],
+ ['type' => self::LOCK_CONTENTS, 'label' => __('Blocage des contenus'), 'color' => '#69D670', 'class' => Web::class],
+ ['type' => self::TEXT, 'label' => __('Texte'), 'color' => '#9090FF', 'class' => Web::class],
+ ['type' => self::ARTICLE_OPEN, 'label' => __('Afficher un article'), 'color' => '#ffcc00', 'class' => Web::class],
+ ['type' => self::DOWNLOAD_PORTION, 'label' => __('Télécharger un extrait'), 'color' => '#AAAAAA', 'class' => Web::class],
+ ['type' => self::TRIGGERSLINK, 'label' => __('Déclencher un lien'), 'color' => '#cc0000', 'class' => Web::class],
+ ['type' => self::LAYER, 'label' => __('Animation de calque'), 'color' => '#3D0254', 'class' => Web::class],
+ ['type' => self::ANCHOR, 'label' => __('Ancre'), 'color' => '#330000', 'class' => Web::class],
+ ['type' => self::FLIPCARD, 'label' => __('Flipcard'), 'color' => '#460e3f', 'class' => Web::class],
];
}
public function addBasicSettingsFields()
{
+ if ($this->_integration) {
+ $this->addField('inline', MultimediaIntegration::class, __('Intégration'), ['default' => 'inline']);
+ }
+ if ($this->_multimedia) {
+ $this->addMultimediaFields();
+ }
+ }
+ public function addMultimediaFields()
+ {
+ $this->addField('header_video', FormSection::class, __('Paramètres multimedia'));
}
public function addAppearanceFields()