]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7950 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 28 Jan 2026 16:42:52 +0000 (17:42 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 28 Jan 2026 16:42:52 +0000 (17:42 +0100)
app/Fluidbook/Compiler/Compiler.php
app/SubForms/Link/Base.php
app/SubForms/Link/Meta.php
app/SubForms/Link/SearchWord.php [new file with mode: 0644]

index 53f40badb9cd28a702fbe60c345a6a5f7b281de2..48bf0101d92b1754f78a6ded0a9a68b758e4befd 100644 (file)
@@ -313,7 +313,7 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
      * @throws \Exception
      */
 
-    function __construct(FluidbookPublication $book, $variant = 'online', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false, FluidbookTheme $theme=null, $hybrid = false, Command $command=null)
+    function __construct(FluidbookPublication $book, $variant = 'online', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false, FluidbookTheme $theme = null, $hybrid = false, Command $command = null)
     {
         ExcelToArray::setCache($book->protected_path('fluidbookpublication/cache/exceltoarray'));
         YoutubeDL::setCookiesFile(resource_path('yt-dlp/cookies.txt'), 'firefox');
@@ -2752,6 +2752,11 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
     {
         return Farm::extractPDFArea($file, $page, $rect, $to, $options, $cache);
     }
+
+    public function addSearchWord($to, $page, $array)
+    {
+
+    }
 }
 
 
index 4b0e8977fdd6d77c7a8b07855ec63a69611e3d7f..9ba371ad9e67b7368c3c7f6d7c7e6de6e62e8d98 100644 (file)
@@ -124,6 +124,7 @@ class Base extends Form
             ['type' => \Fluidbook\Tools\Links\Link::FLUIDBOOK_TOOLBOX_ELEARNING_CONTENT, 'label' => __('Contenu e-learning'), 'color' => '#370f20', 'class' => ElearningContent::class],
             ['type' => \Fluidbook\Tools\Links\Link::OBJECT3D, 'label' => __('Objet 3D'), 'color' => '#00ffff', 'class' => Object3D::class],
             ['type' => \Fluidbook\Tools\Links\Link::LAYER_MASK, 'label' => __('Masque'), 'color' => '#e34f7b', 'class' => LayerMask::class],
+            ['type' => \Fluidbook\Tools\Links\Link::SEARCH_WORD, 'label' => __('Mots à ajouter au moteur de recherche'), 'color' => '#726b45', 'class' => SearchWord::class],
             //['type' => \Fluidbook\Tools\Links\Link::HTML5MULTIMEDIA, 'label' => __('Lien Multimédia (HTML)'), 'color' => '#34A853', 'disabled' => true, 'class' => Web::class],
             //['type' => \Fluidbook\Tools\Links\Link::BOOKMARK_CORNER, 'label' => __('Lien marque-page sur coin de page'), 'color' => '#000000', 'disabled' => true, 'class' => Web::class],
             //['type' => \Fluidbook\Tools\Links\Link::PAGE_CORNER, 'label' => __('Coin de page'), 'color' => '#f19043', 'disabled' => true, 'class' => Web::class],
@@ -355,7 +356,7 @@ class Base extends Form
      * @return string
      */
 
-    public function render(?callable $callback=null)
+    public function render(?callable $callback = null)
     {
         return view('fluidbook_publication.link_editor_form', ['form' => $this, 'crud' => $this->crud])->render($callback);
     }
index 949b9b7237bd3304dadc0e3b707b2d370020e8e1..273fa41b0e4329d6e3611c919d766252f598316d 100644 (file)
@@ -11,4 +11,5 @@ class Meta extends Base
     protected $_stats = false;
     protected $_uid = false;
     protected $_visibility = false;
+    protected $_accessibility = false;
 }
diff --git a/app/SubForms/Link/SearchWord.php b/app/SubForms/Link/SearchWord.php
new file mode 100644 (file)
index 0000000..5f1b67d
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+namespace App\SubForms\Link;
+
+class SearchWord extends Meta
+{
+
+    protected $_extra = false;
+
+    public function addDestinationField()
+    {
+        $this->addField('to', \Cubist\Backpack\Magic\Fields\Text::class, __('Mots à ajouter au moteur de recherche'));
+    }
+}