Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
pathindexcollection.php
1<?php
2
4
8
13 extends Index\Internals\EO_PathIndex_Collection
14{
16 static $verbose = false;
17
19 private static $documentRoot;
20
22 private static $enabledLanguages;
24 private static $availableLanguages;
25
27 private static $useTranslationRepository;
29 private static $translationRepositoryLanguages;
31 private static $translationEnabledLanguages;
33 private static $translationRepositoryRoot;
34
36 private $immediateChildren = [];
37
39 private $ancestorsPaths = [];
40
42 private $checkLanguages = [];
43
49 private static function configure()
50 {
51 self::$documentRoot = \rtrim(Translate\IO\Path::tidy(Main\Application::getDocumentRoot()), '/');
52
53 self::$enabledLanguages = Translate\Config::getEnabledLanguages();
54 self::$availableLanguages = Translate\Config::getAvailableLanguages();
55
56 self::$useTranslationRepository = Main\Localization\Translation::useTranslationRepository();
57 if (self::$useTranslationRepository)
58 {
59 self::$translationRepositoryLanguages = Translate\Config::getTranslationRepositoryLanguages();
60 self::$translationRepositoryRoot = \rtrim(Main\Localization\Translation::getTranslationRepositoryPath(), '/');
61
62 // only active languages
63 self::$translationEnabledLanguages = \array_intersect(self::$translationRepositoryLanguages, self::$enabledLanguages);
64 }
65 }
66
74 public function countItemsToProcess(?Translate\Filter $filter = null): int
75 {
76 if (isset($filter, $filter->path))
77 {
78 $relPath = '/'. \trim($filter->path, '/');
79 $totalItems = (int)Index\Internals\PathLangTable::getCount(['=%PATH' => $relPath .'%']);
80 }
81 else
82 {
83 $totalItems = (int)Index\Internals\PathLangTable::getCount();
84 }
85
86 return $totalItems;
87 }
88
98 public function collect(?Translate\Filter $filter = null, ?Translate\Controller\ITimeLimit $timer = null, ?Translate\Filter $seek = null): int
99 {
100 self::configure();
101
102 if (isset($filter, $filter->path))
103 {
104 $relPath = $filter->path;
105 }
106 else
107 {
108 $relPath = Translate\Config::getDefaultPath();
109 }
110 $relPath = '/'. \trim($relPath, '/');
111
112 if (self::$useTranslationRepository)
113 {
114 $this->checkLanguages = self::$translationEnabledLanguages;
115 if (isset($filter, $filter->langId))
116 {
117 $this->checkLanguages = \array_intersect($filter->langId, $this->checkLanguages);
118 }
119 }
120
121 $pathFilter = [
122 '=%PATH' => $relPath.'%'
123 ];
124 if (isset($seek, $seek->pathLangId))
125 {
126 $pathFilter['>ID'] = $seek->pathLangId;
127 }
128
129 $cachePathLangRes = Index\Internals\PathLangTable::getList([
130 'filter' => $pathFilter,
131 'order' => ['ID' => 'ASC'],
132 'select' => ['ID', 'PATH'],
133 ]);
134 $processedItemCount = 0;
135 while ($pathLang = $cachePathLangRes->fetch())
136 {
137 $this->collectFilePath($pathLang['PATH']);
138
139 $processedItemCount ++;
140
141 if ($timer !== null && $timer->hasTimeLimitReached())
142 {
143 if ($seek !== null)
144 {
145 $seek->nextLangPathId = (int)$pathLang['ID'];
146 }
147 break;
148 }
149 }
150
151 return $processedItemCount;
152 }
153
161 private function collectFilePath($relPath): int
162 {
163 $fullPath = Translate\IO\Path::tidy(self::$documentRoot.'/'.$relPath);
164
165 $topPath = $this->constructAncestorsByPath($relPath);
166
167 $topPathId = (int)$topPath['ID'];
168 $topDepthLevel = (int)$topPath['DEPTH_LEVEL'];
169 $isTopLang = $topPath['IS_LANG'];
170
171 $topLangId = null;
172 if ($isTopLang)
173 {
174 $topLangId = Translate\IO\Path::extractLangId($relPath);
175 }
176
177 $relPath = Translate\IO\Path::replaceLangId($relPath, '#LANG_ID#');
178
179 if ($isTopLang)
180 {
181 if ($langSettings = Translate\Settings::instantiateByPath(self::$documentRoot.'/'.$relPath))
182 {
183 if (!$langSettings->isExists() || !$langSettings->load())
184 {
185 unset($langSettings);
186 }
187 }
188 }
189
200 $lookForLangDirectory =
201 function (
202 $parentFullPath,
203 $parentRelPath,
204 $parentId,
205 $isParentLang = false,
206 $parentLangId = null,
207 $depthLevel = 0
208 )
209 use (
210 &$lookForLangDirectory,
212 &$langSettings
213 )
214 {
215 $processedItemCount = 0;
216
217 $this->getImmediateChildren($parentId);
218
219 if ($isParentLang)
220 {
221 $childrenList = Translate\IO\FileSystemHelper::getFileList($parentFullPath);
222 if (!empty($childrenList))
223 {
224 foreach ($childrenList as $fullPath)
225 {
226 $name = \basename($fullPath);
227 if (\in_array($name, Translate\IGNORE_FS_NAMES))
228 {
229 continue;
230 }
231 if (!Translate\IO\Path::isPhpFile($name))
232 {
233 continue;
234 }
235 if (!\is_file($fullPath))
236 {
237 continue;
238 }
239
240 $relPath = Translate\IO\Path::replaceLangId($parentRelPath . '/'. $name, '#LANG_ID#');
241
242 $pathId = null;
243
244 if (isset($this->immediateChildren[$parentId][$relPath]))
245 {
246 $pathId = $this->immediateChildren[$parentId][$relPath];
247 }
248
249 if (self::$verbose)
250 {
251 echo "File path: {$relPath}";
252 }
253 if ($pathId === null)
254 {
255 $nodeData = [
256 'PARENT_ID' => $parentId,
257 'NAME' => $name,
258 'PATH' => $relPath,
259 'IS_LANG' => 'Y',
260 'IS_DIR' => 'N',
261 'DEPTH_LEVEL' => $depthLevel,
262 ];
263
264 if ($langSettings instanceof Translate\Settings)
265 {
266 $settings = $langSettings->getOptions($relPath);
267 if (!empty($settings[Translate\Settings::OPTION_LANGUAGES]))
268 {
269 $nodeData['OBLIGATORY_LANGS'] = \implode(',', $settings[Translate\Settings::OPTION_LANGUAGES]);
270 }
271 }
272
273 $res = Index\Internals\PathIndexTable::add($nodeData);
274 $pathId = $res->getId();
275
276 $this->immediateChildren[$parentId][$relPath] = $pathId;
277 }
278
279 if (self::$verbose)
280 {
281 echo "\tIndex id: {$pathId}\n";
282 }
283
284 //yield $pathId;
285 $processedItemCount ++;
286 }
287 }
288 }
289
290 // dir only
291 $childrenList = Translate\IO\FileSystemHelper::getFolderList($parentFullPath);
292 if (empty($childrenList))
293 {
294 $childrenList = [];
295 }
296
297 if ($parentLangId === null && \basename($parentFullPath) === 'lang')
298 {
299 foreach ($childrenList as $i => $fullPath)
300 {
301 $name = \basename($fullPath);
302 if (\in_array($name, Translate\IGNORE_FS_NAMES))
303 {
304 unset($childrenList[$i]);
305 }
306 if (!\in_array($name, self::$enabledLanguages))
307 {
308 unset($childrenList[$i]);
309 }
310 }
311 unset($i, $fullPath, $name);
312 if (self::$useTranslationRepository)
313 {
314 // translation Repository
315 foreach ($this->checkLanguages as $langId)
316 {
317 $fullPathLang = Main\Localization\Translation::convertLangPath($parentFullPath.'/'.$langId, $langId);
318 if (\file_exists($fullPathLang))
319 {
320 $childrenList[] = $fullPathLang;
321 }
322 }
323 unset($langId, $fullPathLang);
324 }
325 }
326
327 if (!empty($childrenList))
328 {
329 $ignoreDev = \implode('|', Translate\IGNORE_MODULE_NAMES);
330 foreach ($childrenList as $fullPath)
331 {
332 $name = \basename($fullPath);
333 if (\in_array($name, Translate\IGNORE_FS_NAMES))
334 {
335 continue;
336 }
337
338 $relPath = $parentRelPath . '/'. $name;
339
340 if (!\is_dir($fullPath))
341 {
342 continue;
343 }
344
345 if (\in_array($relPath, Translate\IGNORE_BX_NAMES))
346 {
347 continue;
348 }
349
350 // /bitrix/modules/[smth]/dev/
351 if (\preg_match("#^bitrix/modules/[^/]+/({$ignoreDev})$#", \trim($relPath, '/')))
352 {
353 continue;
354 }
355
356 if ($isParentLang && \in_array($name, Translate\IGNORE_LANG_NAMES))
357 {
358 continue;
359 }
360
361 $isLang = $isParentLang || ($name === 'lang');
362 if ($isLang)
363 {
364 if (\in_array($name, self::$availableLanguages))
365 {
366 // only active languages
367 if (!\in_array($name, self::$enabledLanguages))
368 {
369 continue;
370 }
371 $parentLangId = $name;
372 $name = '#LANG_ID#';
373 }
374 $relPath = Translate\IO\Path::replaceLangId($relPath, '#LANG_ID#');
375 }
376
377 $pathId = null;
378
379 if (isset($this->immediateChildren[$parentId][$relPath]))
380 {
381 $pathId = $this->immediateChildren[$parentId][$relPath];
382 }
383
384 if (self::$verbose)
385 {
386 echo "Path folder: {$relPath}";
387 }
388 if ($pathId === null)
389 {
390 $nodeData = [
391 'PARENT_ID' => $parentId,
392 'NAME' => $name,
393 'PATH' => $relPath,
394 'IS_LANG' => $isLang ? 'Y' : 'N',
395 'IS_DIR' => 'Y',
396 'DEPTH_LEVEL' => $depthLevel,
397 ];
398
399 if ($langSettings instanceof Translate\Settings)
400 {
401 $settings = $langSettings->getOptions($relPath);
402 if (!empty($settings[Translate\Settings::OPTION_LANGUAGES]))
403 {
404 $nodeData['OBLIGATORY_LANGS'] = \implode(',', $settings[Translate\Settings::OPTION_LANGUAGES]);
405 }
406 }
407
408 $res = Index\Internals\PathIndexTable::add($nodeData);
409 $pathId = $res->getId();
410
411 $this->immediateChildren[$parentId][$relPath] = $pathId;
412 $this->immediateChildren[$pathId] = [];
413
414 $this->ancestorsPaths[$relPath] = [
415 'ID' => $pathId,
416 'DEPTH_LEVEL' => $depthLevel,
417 'IS_LANG' => $isLang,
418 'PATH' => $relPath,
419 ];
420 }
421
422 if (self::$verbose)
423 {
424 echo "\tIndex id: {$pathId}\n";
425 }
426
427 $processedItemCount += $lookForLangDirectory($fullPath, $relPath, $pathId, $isLang, $parentLangId, $depthLevel + 1);// go deeper
428 $processedItemCount ++;
429 }
430 }
431
432 return $processedItemCount;
433 };
434
435 $processedItemCount = $lookForLangDirectory($fullPath, $relPath, $topPathId, $isTopLang, $topLangId, $topDepthLevel + 1);
436
437 if ($isTopLang && isset($langSettings))
438 {
440 $settings = $langSettings->getOptions('*');
441 if (!empty($settings) && !empty($settings[Translate\Settings::OPTION_LANGUAGES]))
442 {
443 Index\Internals\PathIndexTable::bulkUpdate(
444 ['OBLIGATORY_LANGS' => \implode(',', $settings[Translate\Settings::OPTION_LANGUAGES])],
445 [
446 'LOGIC' => 'OR',
447 '=PATH' => $relPath,
448 '=%PATH' => $relPath. '/%',
449 ]
450 );
451 }
452 foreach ($langSettings as $settingPath => $settings)
453 {
454 if (\strpos($settingPath, '*') !== false && $settingPath !== '*' && !empty($settings['languages']))
455 {
456 $settingPath = \str_replace('*', '', $settingPath);
457 Index\Internals\PathIndexTable::bulkUpdate(
458 ['OBLIGATORY_LANGS' => \implode(',', $settings[Translate\Settings::OPTION_LANGUAGES])],
459 [
460 'LOGIC' => 'OR',
461 '=PATH' => $relPath .'/#LANG_ID#/'. $settingPath,
462 '=%PATH' => $relPath .'/#LANG_ID#/'. $settingPath. '/%',
463 ]
464 );
465 }
466 }
467 foreach ($langSettings as $settingPath => $settings)
468 {
469 if (Translate\IO\Path::isPhpFile($settingPath) && !empty($settings[Translate\Settings::OPTION_LANGUAGES]))
470 {
471 Index\Internals\PathIndexTable::bulkUpdate(
472 ['OBLIGATORY_LANGS' => \implode(',', $settings[Translate\Settings::OPTION_LANGUAGES])],
473 ['=PATH' => $relPath .'/#LANG_ID#/'. $settingPath]
474 );
475 }
476 }
477 }
478
479 return $processedItemCount;
480 }
481
482
483
491 public function constructAncestorsByPath($path): ?array
492 {
493 if (isset($this->ancestorsPaths[$path]))
494 {
495 return $this->ancestorsPaths[$path];
496 }
497
498 $pathParts = \explode('/', \trim($path, '/'));
499
500 $searchPath = '';
501 $ancestorsPathSearch = [];
502 foreach ($pathParts as $part)
503 {
504 $searchPath .= '/'. $part;
505 if (isset($this->ancestorsPaths[$searchPath]))
506 {
507 continue;
508 }
509 $ancestorsPathSearch[] = $searchPath;
510 }
511 $pathRes = Index\Internals\PathIndexTable::getList([
512 'select' => ['ID', 'DEPTH_LEVEL', 'IS_LANG', 'PATH'],
513 'filter' => ['=PATH' => $ancestorsPathSearch],
514 ]);
515 while ($pathInx = $pathRes->fetch())
516 {
517 $pathInx['IS_LANG'] = ($pathInx['IS_LANG'] == 'Y');
518 $this->ancestorsPaths[$pathInx['PATH']] = $pathInx;
519 }
520
521 if (isset($this->ancestorsPaths[$path]))
522 {
523 return $this->ancestorsPaths[$path];
524 }
525
526
527 $pathInx = null;
528 $searchPath = '';
529 $searchParentId = 0;
530 $searchDepthLevel = 0;
531 $isLang = false;
532
533 foreach ($pathParts as $part)
534 {
535 $searchPath .= '/'. $part;
536
537 if (isset($this->ancestorsPaths[$searchPath]) && $searchPath !== $path)
538 {
539 $searchParentId = (int)$this->ancestorsPaths[$searchPath]['ID'];
540 $searchDepthLevel = (int)$this->ancestorsPaths[$searchPath]['DEPTH_LEVEL'] + 1;
541 $isLang = $this->ancestorsPaths[$searchPath]['IS_LANG'];
542 continue;
543 }
544
545 if ($isLang === false)
546 {
547 $isLang = ($part === 'lang');
548 }
549
550 $nodeData = [
551 'NAME' => $part,
552 'PATH' => $searchPath,
553 'PARENT_ID' => $searchParentId,
554 'DEPTH_LEVEL' => $searchDepthLevel,
555 'IS_LANG' => $isLang ? 'Y' : 'N',
556 'IS_DIR' => (Translate\IO\Path::isPhpFile($part) ? 'N' : 'Y'),
557 ];
558
559 $pathInx = Index\Internals\PathIndexTable::add($nodeData);
560 $searchParentId = $pathInx->getId();
561
562 $this->ancestorsPaths[$searchPath] = [
563 'ID' => $searchParentId,
564 'DEPTH_LEVEL' => $searchDepthLevel,
565 'IS_LANG' => $isLang,
566 'PATH' => $searchPath,
567 ];
568
569 $searchDepthLevel ++;
570 }
571
572 return $this->ancestorsPaths[$path];
573 }
574
575
583 private function getImmediateChildren($parentId): array
584 {
585 if (!isset($this->immediateChildren[$parentId]))
586 {
587 $this->immediateChildren[$parentId] = [];
588
589 $nodeRes = Index\Internals\PathIndexTable::getList([
590 'filter' => ['=PARENT_ID' => $parentId],
591 'select' => ['ID', 'PATH'],
592 ]);
593 while ($nodeInx = $nodeRes->fetch())
594 {
595 $this->immediateChildren[$parentId][$nodeInx['PATH']] = (int)$nodeInx['ID'];
596 }
597 }
598
599 return $this->immediateChildren[$parentId];
600 }
601
602
611 private function getAncestors($nodeId, $topNodeId = -1): array
612 {
613 $nodeRes = Index\Internals\PathIndexTable::getList([
614 'filter' => ['=ID' => (int)$nodeId],
615 ]);
616
617 $result = [];
618 if ($nodeInx = $nodeRes->fetchObject())
619 {
620 $result[$nodeInx->getId()] = $nodeInx;
621
622 if ((int)$nodeInx->getParentId() > 0)
623 {
624 $nodeRes = Index\Internals\PathIndexTable::getList([
625 'filter' => [
626 '=DESCENDANTS.PARENT_ID' => $nodeInx->getId(),//ancestor
627 ],
628 'order' => ['DESCENDANTS.DEPTH_LEVEL' => 'DESC'],
629 ]);
630 while ($nodeInx = $nodeRes->fetchObject())
631 {
632 $result[$nodeInx->getId()] = $nodeInx;
633
634 if ((int)$nodeInx->getParentId() == 0)
635 {
636 break;
637 }
638 if ($topNodeId > 0 && (int)$nodeInx->getId() == $topNodeId)
639 {
640 break;
641 }
642 }
643 }
644 }
645
646 return \array_reverse($result, true);
647 }
648
654 public function arrangeTree(): self
655 {
656 $pathList = Index\Internals\PathIndexTable::getList([
657 'filter' => [
658 '=PARENT_ID' => 0,
659 '=IS_DIR' => 'Y',
660 ],
661 'select' => ['ID'],
662 ]);
663
664 while ($path = $pathList->fetch())
665 {
666 Index\Internals\PathIndexTable::arrangeTree($path['ID']);
667 }
668
669 return $this;
670 }
671
679 public function purge(?Translate\Filter $filter = null): self
680 {
681 Index\Internals\PathIndexTable::purge($filter);
682
683 return $this;
684 }
685
694 public function validate(?Translate\Filter $filter = null, bool $recursively = true): self
695 {
696 $update = ['INDEXED' => 'Y', 'INDEXED_TIME' => new Main\Type\DateTime()];
697
698 if ($recursively)
699 {
700 $filterOut = Index\Internals\FileIndexTable::processFilter($filter);
701 Index\Internals\FileIndexTable::bulkUpdate($update, $filterOut);
702 }
703
704 $filterOut = Index\Internals\PathIndexTable::processFilter($filter);
705 Index\Internals\PathIndexTable::bulkUpdate($update, $filterOut);
706
707 return $this;
708 }
709
718 public function unvalidate(Translate\Filter $filter = null, bool $recursively = true): self
719 {
720 if ($recursively)
721 {
722 $filterOut = Index\Internals\FileIndexTable::processFilter($filter);
723 Index\Internals\FileIndexTable::bulkUpdate(['INDEXED' => 'N'], $filterOut);
724 }
725
726 $filterOut = Index\Internals\PathIndexTable::processFilter($filter);
727 Index\Internals\PathIndexTable::bulkUpdate(['INDEXED' => 'N'], $filterOut);
728
729 return $this;
730 }
731
732
740 public function collectModuleAssignment(?Translate\Filter $filter = null): self
741 {
742 $searchPath = isset($filter, $filter->path) ? $filter->path : '';
743
744 if (!empty($searchPath))
745 {
746 $pathStartRes = Index\Internals\PathIndexTable::getList([
747 'filter' => [
748 '=PATH' => $searchPath,
749 ],
750 'select' => ['ID', 'PATH'],
751 ]);
752 if ($path = $pathStartRes->fetchObject())
753 {
754 $relPathParts = \explode('/', \trim($path->getPath(), '/'));
755
756 // /bitrix/modules/[smth]/
757 if (\count($relPathParts) >= 3 && $relPathParts[0] == 'bitrix' && $relPathParts[1] == 'modules')
758 {
759 $moduleId = $path->detectModuleId();
760 if ($moduleId !== null)
761 {
762 Index\Internals\PathIndexTable::bulkUpdate(
763 ['MODULE_ID' => $moduleId],
764 ['=DESCENDANTS.PARENT_ID' => $path->getId()]
765 );
766 }
767 }
768
769 //todo: else select sub nodes
770 }
771
772 }
773 else
774 {
775 $pathModulesRes = Index\Internals\PathIndexTable::getList([
776 'filter' => [
777 '=PATH' => '/bitrix/modules',
778 ],
779 'select' => ['ID'],
780 ]);
781 while ($pathModules = $pathModulesRes->fetch())
782 {
783 $pathList = Index\Internals\PathIndexTable::getList([
784 'filter' => [
785 '=PARENT_ID' => $pathModules['ID'],
786 ],
787 'select' => ['ID', 'PATH'],
788 ]);
789 while ($path = $pathList->fetchObject())
790 {
791 $moduleId = $path->detectModuleId();
792 if ($moduleId !== null)
793 {
794 Index\Internals\PathIndexTable::bulkUpdate(
795 ['MODULE_ID' => $moduleId],
796 ['=DESCENDANTS.PARENT_ID' => $path->getId()]
797 );
798 }
799 }
800 }
801 }
802
803 return $this;
804 }
805
813 public function collectAssignment(?Translate\Filter $filter = null): self
814 {
815 // /bitrix/(mobileapp|templates|components|activities|wizards|gadgets|js|..)
816 foreach (Translate\ASSIGNMENT_TYPES as $assignmentId)
817 {
818 $pathEntryRes = Index\Internals\PathIndexTable::getList([
819 'filter' => [
820 '=PATH' => '/bitrix/'. $assignmentId,
821 ],
822 'select' => ['ID', 'PATH'],
823 ]);
824 while ($path = $pathEntryRes->fetchObject())
825 {
826 Index\Internals\PathIndexTable::bulkUpdate(
827 ['ASSIGNMENT' => $assignmentId],
828 ['=DESCENDANTS.PARENT_ID' => $path->getId()]
829 );
830 }
831 }
832
833 $pathModulesRes = Index\Internals\PathIndexTable::getList([
834 'filter' => [
835 '=PATH' => '/bitrix/modules',
836 ],
837 'select' => ['ID'],
838 ]);
839 while ($pathModules = $pathModulesRes->fetch())
840 {
841 $pathList = Index\Internals\PathIndexTable::getList([
842 'filter' => [
843 '=PARENT_ID' => $pathModules['ID'],
844 '!=MODULE_ID' => null,
845 ],
846 'select' => ['ID', 'PATH', 'MODULE_ID'],
847 ]);
848 while ($modulePath = $pathList->fetchObject())
849 {
850 $moduleId = $modulePath->getModuleId();
851
852 foreach (Translate\ASSIGNMENT_TYPES as $assignmentId)
853 {
854 $filterPaths = [
855 // /bitrix/modules/[moduleName]/install/[smth]
856 '/bitrix/modules/'.$moduleId.'/install/'. $assignmentId,
857 // /bitrix/modules/[moduleName]/lang/#LANG_ID#/[smth]
858 '/bitrix/modules/'.$moduleId.'/lang/#LANG_ID#/'. $assignmentId,
859 // /bitrix/modules/[moduleName]/lang/#LANG_ID#/install/[smth]
860 '/bitrix/modules/'.$moduleId.'/lang/#LANG_ID#/install/'. $assignmentId,
861 // /bitrix/modules/[moduleName]/install/bitrix/templates/[templateName]
862 '/bitrix/modules/'.$moduleId.'/install/bitrix/'. $assignmentId,
863 // /bitrix/modules/[moduleName]/handlers/delivery/[smth]
864 // /bitrix/modules/[moduleName]/handlers/paysystem/[smth]
865 '/bitrix/modules/'.$moduleId.'/handlers/'. $assignmentId,
866 ];
867 if ($assignmentId == 'templates')
868 {
869 // /bitrix/modules/[moduleName]/install/public/templates/[templateName]
870 $filterPaths[] = '/bitrix/modules/'.$moduleId.'/install/public/'. $assignmentId;
871 }
872 $pathEntryRes = Index\Internals\PathIndexTable::getList([
873 'filter' => [
874 '=PATH' => $filterPaths,
875 '=DESCENDANTS.PARENT_ID' => $modulePath->getId(),
876 ],
877 'select' => ['ID', 'PATH'],
878 ]);
879 while ($path = $pathEntryRes->fetchObject())
880 {
881 Index\Internals\PathIndexTable::bulkUpdate(
882 ['ASSIGNMENT' => $assignmentId],
883 ['=DESCENDANTS.PARENT_ID' => $path->getId()]
884 );
885 }
886 }
887 }
888 }
889
890 return $this;
891 }
892}
countItemsToProcess(?Translate\Filter $filter=null)
collectAssignment(?Translate\Filter $filter=null)
collectModuleAssignment(?Translate\Filter $filter=null)
validate(?Translate\Filter $filter=null, bool $recursively=true)
unvalidate(Translate\Filter $filter=null, bool $recursively=true)
collect(?Translate\Filter $filter=null, ?Translate\Controller\ITimeLimit $timer=null, ?Translate\Filter $seek=null)
static instantiateByPath(string $fullPath)
Definition settings.php:38