register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'handle_toolbar', array());
}
function handle_toolbar(&$event, $param)
{
$imageBase = '../../plugins/' . PluginUtility::PLUGIN_BASE_NAME . '/images/';
$unit = array(
'type' => 'format',
'title' => 'Insert an unit test',
'icon' => $imageBase . 'unit-doc-block.png',
'open' => '\n\n\n\t',
'close' => '\n\t
\n\t\n\t\n',
// 'key' => $unitShortcutKey
);
/**
* This is called from the js.php with a get HTTP
* There is no knowledge of which page is modified
*/
$frontmatter = << 'insert',
'title' => 'Insert a frontmatter',
'icon' => $imageBase . 'table-of-contents.svg',
'insert' => $frontmatter,
'block' => true
);
$blockquote = array(
'type' => 'format',
'title' => 'blockquote',
'icon' => '../../plugins/' . PluginUtility::PLUGIN_BASE_NAME . '/images/blockquote-icon.png',
'open' => '',
'close' => '
',
);
$event->data[] = array(
'type' => 'picker',
'title' => "Choose comboStrap component",
'icon' => '../../plugins/' . PluginUtility::PLUGIN_BASE_NAME . '/images/logo.svg',
'list' => array($frontmatter, $blockquote, $unit)
);
$event->data[] = array(
'type' => 'format',
'title' => 'webcode',
'icon' => '../../plugins/' . PluginUtility::PLUGIN_BASE_NAME . '/images/webcode.png',
'open' => '\n',
'close' => '\n\n'
//'key' => $webCodeShortcutKey
);
return true;
}
}