Skip to content

Commit

Permalink
MD: a bit of clean up, part 5
Browse files Browse the repository at this point in the history
  • Loading branch information
schmitz-ilias committed Jan 30, 2025
1 parent d46d9d3 commit f4c8384
Show file tree
Hide file tree
Showing 26 changed files with 12 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

namespace ILIAS\MetaData\Editor\Dictionary;

use ILIAS\MetaData\Paths\PathInterface;
use ILIAS\MetaData\Paths\FactoryInterface as PathFactoryInterface;
use ILIAS\MetaData\Elements\Structure\StructureElementInterface;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ protected function getGeneralSection(

$keywords = [];
$keyword_els = $this->navigator_factory->navigator(
$keywords_path = $this->path_collection->keywords(),
$this->path_collection->keywords(),
$root
)->elementsAtFinalStep();
foreach ($keyword_els as $el) {
Expand Down Expand Up @@ -389,7 +389,6 @@ protected function getTypicalLearningTimeSection(
SetInterface $set
): Section {
$ff = $this->ui_factory->input()->field();
$inputs = [];

$tlt_el = $this->navigator_factory->navigator(
$path = $this->path_collection->firstTypicalLearningTime(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
use ILIAS\MetaData\Paths\FactoryInterface as PathFactory;
use ILIAS\MetaData\Paths\PathInterface;
use ILIAS\MetaData\Paths\Filters\FilterType;
use ILIAS\MetaData\Paths\Path;

class PathCollection
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
use ILIAS\UI\Factory as UIFactory;
use ILIAS\MetaData\Editor\Presenter\PresenterInterface;
use ILIAS\UI\Component\Dropdown\Standard as StandardDropdown;
use ILIAS\MetaData\Editor\Http\RequestInterface;

class RootContent
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

use ILIAS\UI\Component\Prompt\Prompt;
use ILIAS\UI\Component\Modal\Modal;
use ILIAS\UI\Component\Signal as Signal;

class FlexibleModal
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use ILIAS\MetaData\Elements\ElementInterface;
use ILIAS\MetaData\Editor\Full\Services\FormFactory;
use ILIAS\MetaData\Repository\Validation\Dictionary\DictionaryInterface as ConstraintDictionaryInterface;
use ILIAS\MetaData\Repository\Validation\Dictionary\Restriction;
use ILIAS\MetaData\Editor\Http\RequestInterface;
use ILIAS\UI\Component\Prompt\State\State;
use ILIAS\MetaData\Editor\Http\StandardAction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public function getUpdateForm(


return $this->getFormForElement(
$base_path,
$element,
$element,
$link,
Expand All @@ -92,7 +91,6 @@ public function getCreateForm(
)->lastElementAtFinalStep();
}
return $this->getFormForElement(
$base_path,
$element,
$context_element,
$link,
Expand All @@ -102,7 +100,6 @@ public function getCreateForm(
}

protected function getFormForElement(
PathInterface $base_path,
ElementInterface $element,
ElementInterface $context_element,
URI $link,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
use ILIAS\MetaData\Elements\ElementInterface;
use ILIAS\MetaData\Editor\Full\Services\DataFinder;
use ILIAS\MetaData\Paths\FactoryInterface as PathFactory;
use ILIAS\MetaData\Paths\Navigator\NavigatorFactoryInterface;
use ILIAS\MetaData\Editor\Full\Services\Inputs\Conditions\FactoryWithConditionTypesService;
use ILIAS\MetaData\Elements\Data\Type;
use ILIAS\MetaData\Vocabularies\ElementHelper\ElementHelperInterface;

class InputFactory
Expand All @@ -40,7 +38,6 @@ class InputFactory
protected Refinery $refinery;
protected PresenterInterface $presenter;
protected PathFactory $path_factory;
protected NavigatorFactoryInterface $navigator_factory;
protected ElementHelperInterface $element_vocab_helper;
protected DataFinder $data_finder;
protected FactoryWithConditionTypesService $types;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ public function getInputInCondition(

protected function rawInput(
ElementInterface $element,
ElementInterface $context_element,
SlotIdentifier $conditional_slot = SlotIdentifier::NULL
ElementInterface $context_element
): FormInput {
$dh = $this->data_helper;
$input = $this->ui_factory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ public function __construct(

protected function rawInput(
ElementInterface $element,
ElementInterface $context_element,
SlotIdentifier $conditional_slot = SlotIdentifier::NULL
ElementInterface $context_element
): FormInput {
$num = $this->ui_factory
->numeric('placeholder')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use ILIAS\MetaData\Editor\Presenter\PresenterInterface;
use ILIAS\MetaData\Repository\Validation\Dictionary\DictionaryInterface as ConstraintDictionary;
use ILIAS\MetaData\Vocabularies\Slots\Identifier as SlotIdentifier;
use ILIAS\MetaData\Elements\Data\Type;

class LangFactory extends BaseFactory
{
Expand All @@ -45,8 +44,7 @@ public function __construct(

protected function rawInput(
ElementInterface $element,
ElementInterface $context_element,
SlotIdentifier $conditional_slot = SlotIdentifier::NULL
ElementInterface $context_element
): FormInput {
$langs = [];
foreach ($this->data_helper->getAllLanguages() as $key) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use ILIAS\MetaData\Repository\Validation\Dictionary\DictionaryInterface as ConstraintDictionary;
use ILIAS\MetaData\Editor\Presenter\PresenterInterface;
use ILIAS\MetaData\Vocabularies\Slots\Identifier as SlotIdentifier;
use ILIAS\MetaData\Elements\Data\Type;

class NonNegIntFactory extends BaseFactory
{
Expand All @@ -45,8 +44,7 @@ public function __construct(

protected function rawInput(
ElementInterface $element,
ElementInterface $context_element,
SlotIdentifier $conditional_slot = SlotIdentifier::NULL
ElementInterface $context_element
): FormInput {
$input = $this->ui_factory
->numeric($this->getInputLabelFromElement($this->presenter, $element, $context_element))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use ILIAS\UI\Component\Input\Field\Factory as UIFactory;
use ILIAS\MetaData\Editor\Presenter\PresenterInterface;
use ILIAS\MetaData\Repository\Validation\Dictionary\DictionaryInterface as ConstraintDictionary;
use ILIAS\MetaData\Vocabularies\Slots\Identifier;
use ILIAS\MetaData\Elements\Data\Type;
use ILIAS\Refinery\Factory as Refinery;

Expand All @@ -50,8 +49,7 @@ public function __construct(

protected function rawInput(
ElementInterface $element,
ElementInterface $context_element,
SlotIdentifier $conditional_slot = SlotIdentifier::NULL
ElementInterface $context_element
): FormInput {
$slot = $this->element_vocab_helper->slotForElement($element);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
use ILIAS\MetaData\Paths\FactoryInterface as PathFactory;
use ILIAS\MetaData\Vocabularies\ElementHelper\ElementHelperInterface;
use ILIAS\MetaData\Vocabularies\Slots\Identifier as SlotIdentifier;
use ILIAS\MetaData\Vocabularies\Slots\Identifier;
use ILIAS\Refinery\Factory as Refinery;
use ILIAS\MetaData\Paths\PathInterface;

Expand Down Expand Up @@ -112,7 +111,7 @@ public function getInput(
return $this->rawInput(
$element,
$context_element,
$slot = $this->element_vocab_helper->slotForElement($element),
$this->element_vocab_helper->slotForElement($element),
true
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,17 @@
use ILIAS\MetaData\Editor\Presenter\PresenterInterface as PresenterInterface;
use ILIAS\MetaData\Editor\Full\Services\DataFinder;
use ILIAS\MetaData\Elements\ElementInterface;
use ILIAS\MetaData\Editor\Full\Services\Actions\FlexibleSignal;
use ILIAS\MetaData\Elements\Data\Type;
use ILIAS\UI\Component\Table\Column\Column;
use ILIAS\UI\Component\Table\Data as DataTable;
use ILIAS\MetaData\DataHelper\DataHelperInterface;
use ILIAS\MetaData\Editor\Http\Request;
use ILIAS\MetaData\Editor\Full\Services\Actions\LinkProvider;
use ILIAS\MetaData\Editor\Http\AsyncAction;
use ILIAS\MetaData\Paths\PathInterface;
use ILIAS\MetaData\Paths\FactoryInterface as PathFactory;
use ILIAS\MetaData\Editor\Full\Services\ConstraintHelper;
use ILIAS\MetaData\Repository\Validation\Dictionary\DictionaryInterface as ConstraintDictionaryInterface;
use ILIAS\MetaData\Editor\Http\RequestInterface;

class TableBuilder
{
Expand Down Expand Up @@ -72,7 +71,7 @@ public function __construct(

public function get(
PathInterface $base_path,
Request $request
RequestInterface $request
): DataTable {
$table = $this->init($base_path);
return $request->applyRequestToDataTable($table);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
use ILIAS\UI\Factory as UIFactory;
use ILIAS\MetaData\Editor\Presenter\PresenterInterface as PresenterInterface;
use ILIAS\MetaData\Editor\Full\Services\DataFinder;
use ILIAS\MetaData\Elements\ElementInterface;
use ILIAS\MetaData\Paths\FactoryInterface as PathFactory;
use ILIAS\MetaData\DataHelper\DataHelperInterface;
use ILIAS\MetaData\Editor\Full\Services\Actions\LinkProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ public function content(
...$elements
);
$builder = $this->services->tableFactory()->table();
$delete_buttons = [];
$update_buttons = [];
foreach ($elements as $element) {
if ($element->isScaffold()) {
continue;
Expand Down
6 changes: 0 additions & 6 deletions components/ILIAS/MetaData/classes/Editor/Http/LinkFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ class LinkFactory implements LinkFactoryInterface
protected \ilCtrlInterface $ctrl;
protected DataFactory $data_factory;

/**
* @var string[]
*/
protected array $parameters = [];
protected Command $command;

public function __construct(
\ilCtrlInterface $ctrl,
DataFactory $data_factory
Expand Down
2 changes: 0 additions & 2 deletions components/ILIAS/MetaData/classes/Editor/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
namespace ILIAS\MetaData\Editor\Http;

use Psr\Http\Message\ServerRequestInterface as HttpRequest;
use ILIAS\MetaData\Paths\PathInterface;
use ILIAS\UI\Component\Input\Container\Form\Standard as StandardForm;
use ILIAS\UI\Component\Modal\RoundTrip as RoundtripModal;
use ILIAS\UI\Component\Table\Data as DataTable;

class Request implements RequestInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@

namespace ILIAS\MetaData\Editor\Http;

use ILIAS\MetaData\Paths\PathInterface;
use ILIAS\UI\Component\Input\Container\Form\Standard as StandardForm;
use ILIAS\UI\Component\Modal\RoundTrip as RoundtripModal;
use ILIAS\UI\Component\Table\Data as DataTable;

interface RequestInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function fetchRequest(
bool $apply_to_forms
): RequestInterface {
return new Request(
$request = $this->http->request(),
$this->http->request(),
$apply_to_forms
);
}
Expand Down
2 changes: 0 additions & 2 deletions components/ILIAS/MetaData/classes/Editor/Presenter/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
namespace ILIAS\MetaData\Editor\Presenter;

use ILIAS\MetaData\Elements\Data\DataInterface as ElementsDataInterface;
use ILIAS\MetaData\Elements\Data\Type;
use ILIAS\MetaData\Presentation\UtilitiesInterface as BaseUtilities;
use ILIAS\MetaData\Presentation\DataInterface as DataPresentation;
use ILIAS\MetaData\Vocabularies\Slots\Identifier as SlotIdentifier;
use ILIAS\MetaData\Vocabularies\Dispatch\Presentation\PresentationInterface as VocabulariesPresentation;
use ILIAS\MetaData\Vocabularies\Dispatch\Presentation\LabelledValueInterface;

class Data implements DataInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function presenter(): PresenterInterface
return $this->presenter;
}
return $this->presenter = new Presenter(
$utilities = new Utilities(
new Utilities(
$this->presentation_services->utilities()
),
$data = new Data(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected function buildTreeAsTool(SetInterface $set, PathInterface $path): Tool
))
->addComponentDecorator(static function (Component $c) use ($hashed): Component {
if ($c instanceof LegacySlate) {
$signal_id = $c->getToggleSignal()->getId();
$c->getToggleSignal()->getId();
return $c->withAdditionalOnLoadCode(static function ($id) use ($hashed) {
return "il.UI.maincontrols.mainbar.engageTool('$hashed');";
});
Expand Down
3 changes: 0 additions & 3 deletions components/ILIAS/MetaData/classes/Editor/Tree/Recursion.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
use ILIAS\MetaData\Elements\ElementInterface;
use ILIAS\MetaData\Paths\FactoryInterface as PathFactoryInterface;
use ILIAS\MetaData\Editor\Presenter\PresenterInterface;
use ILIAS\MetaData\Paths\PathInterface;
use ILIAS\MetaData\Paths\Navigator\NavigatorFactoryInterface;
use ILIAS\MetaData\Editor\Dictionary\DictionaryInterface;
use ILIAS\MetaData\Editor\Dictionary\TagInterface;
use ILIAS\MetaData\Paths\Filters\FilterType;
use ILIAS\MetaData\Editor\Http\Command;
use ILIAS\MetaData\Editor\Http\Parameter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ protected function fullEditorAction(): void
$set = $editor->manipulateMD()->prepare($set, $base_path);

// do the action
$success = false;
switch ($action) {
case StandardAction::CREATE:
case StandardAction::UPDATE:
Expand Down

0 comments on commit f4c8384

Please sign in to comment.