19 declare(strict_types=1);
62 foreach ($this->content_assembler->get($set, $request) as $type => $entity) {
63 if ($type === ContentType::FORM) {
69 if (!$form?->getData()) {
72 $data = $form->getData();
77 $this->copyright_handler->isCPSelectionActive() &&
84 $this->manipulator->execute($set);
92 foreach ($data as $post_key => $value) {
97 $path = $this->path_factory->fromString($post_key);
98 if ($value === null || $value ===
'') {
99 $set = $this->manipulator->prepareDelete($set,
$path);
102 $set = $this->manipulator->prepareCreateOrUpdate($set,
$path, $value);
114 $keyword_els = $this->navigator_factory->navigator(
115 $path = $this->path_collection->keywords(),
117 )->elementsAtFinalStep();
118 $number_of_keywords = count(iterator_to_array($keyword_els));
120 if (!empty($values)) {
121 $set = $this->manipulator->prepareCreateOrUpdate($set,
$path, ...$values);
123 if (count($values) < $number_of_keywords) {
124 $delete_path = $this->path_collection->keywordsBetweenIndices(
126 $number_of_keywords - 1
128 $set = $this->manipulator->prepareDelete($set, $delete_path);
137 foreach ($data as $post_key => $value) {
138 $path = $this->path_factory->fromString($post_key);
139 if ($value === null || $value ===
'') {
140 $set = $this->manipulator->prepareDelete($set,
$path);
143 $set = $this->manipulator->prepareCreateOrUpdate($set,
$path, $value);
157 foreach ($data as $post_key => $value) {
158 $path = $paths[$post_key];
159 if ($value === null || $value ===
'') {
160 $set = $this->manipulator->prepareDelete($set,
$path);
163 $set = $this->manipulator->prepareCreateOrUpdate($set,
$path, $value);
172 $description = $data[0];
177 if ($description ===
'' || $description === null) {
178 $set = $this->manipulator->prepareCreateOrUpdate(
180 $this->path_collection->hasCopyright(),
183 $set = $this->manipulator->prepareCreateOrUpdate(
185 $this->path_collection->sourceForHasCopyright(),
188 return $this->manipulator->prepareDelete($set, $this->path_collection->copyright());
191 $set = $this->manipulator->prepareCreateOrUpdate(
193 $this->path_collection->hasCopyright(),
196 $set = $this->manipulator->prepareCreateOrUpdate(
198 $this->path_collection->sourceForHasCopyright(),
201 $set = $this->manipulator->prepareCreateOrUpdate(
203 $this->path_collection->copyright(),
208 $this->copyright_handler->isObjectTypeHarvested($set->
getRessourceID()->type()) &&
211 $this->copyright_handler->setOerHarvesterBlocked(
213 (bool) $data[1][ContentAssembler::OER_BLOCKED]
const TYPICAL_LEARNING_TIME
const CUSTOM_CP_DESCRIPTION