forked from ILIAS-eLearning/ILIAS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MD: data table in LOM editor, part 2
- Loading branch information
1 parent
446fcaf
commit cef9354
Showing
25 changed files
with
425 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
components/ILIAS/MetaData/classes/Editor/Full/AsyncContent.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of ILIAS, a powerful learning management system | ||
* published by ILIAS open source e-Learning e.V. | ||
* | ||
* ILIAS is licensed with the GPL-3.0, | ||
* see https://www.gnu.org/licenses/gpl-3.0.en.html | ||
* You should have received a copy of said license along with the | ||
* source code, too. | ||
* | ||
* If this is not the case or you just want to try ILIAS, you'll find | ||
* us at: | ||
* https://www.ilias.de | ||
* https://github.com/ILIAS-eLearning | ||
* | ||
*********************************************************************/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ILIAS\MetaData\Editor\Full; | ||
|
||
use ILIAS\UI\Component\Prompt\State\State; | ||
use ILIAS\MetaData\Paths\PathInterface; | ||
use ILIAS\MetaData\Elements\ElementInterface; | ||
use ILIAS\MetaData\Editor\Full\Services\Services as FullEditorServices; | ||
use ILIAS\MetaData\Editor\Full\Services\Actions\FlexibleModal; | ||
use ILIAS\MetaData\Editor\Http\RequestInterface; | ||
|
||
class AsyncContent | ||
{ | ||
protected FullEditorServices $services; | ||
|
||
public function __construct( | ||
FullEditorServices $services | ||
) { | ||
$this->services = $services; | ||
} | ||
|
||
public function contentForEdit( | ||
PathInterface $base_path, | ||
ElementInterface $element, | ||
RequestInterface $request | ||
): State { | ||
if ($element->isScaffold()) { | ||
return $this->services->actions()->getModal()->createContent( | ||
$base_path, | ||
$element, | ||
$request | ||
); | ||
} | ||
return $this->services->actions()->getModal()->updateContent( | ||
$base_path, | ||
$element, | ||
$request | ||
); | ||
} | ||
|
||
public function contentForDelete( | ||
PathInterface $base_path, | ||
ElementInterface $element | ||
): FlexibleModal { | ||
return $this->services->actions()->getModal()->deleteContent($base_path, $element); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,7 @@ public function init(): FullEditor | |
$presenter, | ||
$panel_content | ||
), | ||
new AsyncContent($services) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.