19use ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher;
37 return $this->context_collection->
main()->repository();
43 $additional_data = $called_contexts->
current()->getAdditionalData();
44 if ($additional_data->is(self::SHOW_EDITOR,
true)) {
45 $title = $this->dic->language()->txt(
'editor');
46 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\
ilUtil::getImagePath(
"standard/icon_edtr.svg"), $title);
48 $iff =
function (
$id) {
49 return $this->identification_provider->contextAwareIdentifier(
$id);
51 $l =
function (
string $content) {
52 return $this->dic->ui()->factory()->legacy()->content($content);
54 $identification = $iff(
"copg_editor");
55 $hashed = $this->hash($identification->serialize());
56 $tools[] = $this->
factory->tool($identification)
58 if (
$c instanceof LegacySlate) {
59 $signal_id =
$c->getToggleSignal()->
getId();
60 return $c->withAdditionalOnLoadCode(
static function (
$id) use ($hashed) {
62 $('body').on('il-copg-editor-slate', function(){
63 if (!il.UI.page.isSmallScreen()) {
64 il.UI.maincontrols.mainbar.engageTool('$hashed');
81 return "<div id='copg-editor-slate-error'></div><div id='copg-editor-slate-content'></div>";
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Page editing GS tool provider.
getToolsForContextStack(CalledContexts $called_contexts)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
withSymbol(Symbol $symbol)
@inheritDoc
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.