19 declare(strict_types=1);
47 $this->ui_factory = $DIC->ui()->factory();
48 $this->
lng = $DIC->language();
49 $this->manager = $DIC->resourceStorage()->manage();
50 $this->revision = $this->manager->getCurrentRevision($this->rid);
56 return $this->
refinery->custom()->transformation($trafo);
62 'title' => $this->ui_factory
66 $this->
lng->txt(
'title')
70 $this->revision->getInformation()->getTitle()
74 function (?
string $value): ?
string {
76 $new_title = empty($value) ? $this->revision->getInformation()->getTitle() : $value;
77 $new_title_without_suffix = preg_replace(
'/\.\w+$/',
'', $new_title);
78 $new_title_with_suffix = $new_title_without_suffix .
'.' . $this->revision->getInformation(
81 $this->revision->getInformation()->setTitle(
82 $new_title_with_suffix
85 return $new_title_with_suffix;
94 return $this->ui_factory->input()->field()->section(
96 $this->
lng->txt(
'edit')
99 fn(array $values):
bool => $this->manager->updateRevision($this->revision)
106 return $this->ui_factory->input()->container()->form()->standard(
111 fn(array $values):
bool => $this->manager->updateRevision($this->revision)
This is how the factory for UI elements looks.
Class ResourceIdentification.