1<?php 2 3use ComboStrap\LinkUtility; 4use ComboStrap\PluginUtility; 5 6if (!defined('DOKU_INC')) die(); 7require_once(__DIR__ . '/../class/PluginUtility.php'); 8require_once(__DIR__ . '/../class/LinkUtility.php'); 9 10/** 11 * Handle the move of a image 12 */ 13class action_plugin_combo_imgmove extends DokuWiki_Action_Plugin 14{ 15 16 /** 17 * As explained https://www.dokuwiki.org/plugin:move 18 * @param Doku_Event_Handler $controller 19 */ 20 function register(Doku_Event_Handler $controller) 21 { 22 $controller->register_hook('PLUGIN_MOVE_HANDLERS_REGISTER', 'BEFORE', $this, 'handle_move', array()); 23 } 24 25 /** 26 * Handle the move of a image 27 * @param Doku_Event $event 28 * @param $params 29 */ 30 function handle_move(Doku_Event $event, $params) 31 { 32 /** 33 * The handlers is the name of the component (ie refers to the {@link syntax_plugin_combo_media} handler) 34 * and 'move_combo_img' to the below method 35 */ 36 $event->data['handlers'][syntax_plugin_combo_media::COMPONENT] = array($this, 'move_combo_img'); 37 } 38 39 /** 40 * 41 * @param $match 42 * @param $state 43 * @param $pos 44 * @param $plugin 45 * @param helper_plugin_move_handler $handler 46 */ 47 public function move_combo_img($match, $state, $pos, $plugin, helper_plugin_move_handler $handler) 48 { 49 /** 50 * The original move method 51 * is {@link helper_plugin_move_handler::media()} 52 * 53 */ 54 $handler->media($match,$state,$pos); 55 56 } 57 58 59} 60