24 return $this->context_collection->
main()->repository();
34 $additional_data = $called_contexts->
current()->getAdditionalData();
35 if ($additional_data->is(self::SHOW_EDITOR,
true)) {
36 $title = $this->dic->language()->txt(
'editor');
37 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\
ilUtil::getImagePath(
"outlined/icon_edtr.svg"), $title);
39 $iff =
function ($id) {
40 return $this->identification_provider->contextAwareIdentifier($id);
42 $l =
function (
string $content) {
43 return $this->dic->ui()->factory()->legacy($content);
45 $identification = $iff(
"copg_editor");
46 $hashed = $this->
hash($identification->serialize());
47 $tools[] = $this->factory->tool($identification)
50 $signal_id = $c->getToggleSignal()->getId();
51 return $c->withAdditionalOnLoadCode(
static function ($id) use ($hashed) {
53 $('body').on('il-copg-editor-slate', function(){ 54 il.UI.maincontrols.mainbar.engageTool('$hashed'); 76 return "<div id='copg-editor-slate-error'></div><div id='copg-editor-slate-content'></div>";
Class ChatMainBarProvider .
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
withSymbol(Symbol $symbol)
Page editing GS tool provider.
getToolsForContextStack(CalledContexts $called_contexts)