File tree Expand file tree Collapse file tree 2 files changed +16
-17
lines changed Expand file tree Collapse file tree 2 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -2539,4 +2539,20 @@ public function prepareInputForClone($input) {
2539
2539
$ input ['_skip_create_actors ' ] = true ;
2540
2540
return $ input ;
2541
2541
}
2542
+
2543
+ protected static function getTemplateByName (string $ name ): int {
2544
+ global $ DB ;
2545
+
2546
+ $ targetTemplateType = (new static ())->getTemplateItemtypeName ();
2547
+ $ targetTemplate = new $ targetTemplateType ();
2548
+ $ targetTemplate ->getFromDBByCrit ([
2549
+ 'name ' => $ DB ->escape ($ name ),
2550
+ ]);
2551
+
2552
+ if ($ targetTemplate ->isNewItem ()) {
2553
+ return 0 ;
2554
+ }
2555
+
2556
+ return $ targetTemplate ->getID ();
2557
+ }
2542
2558
}
Original file line number Diff line number Diff line change @@ -79,8 +79,6 @@ abstract public static function getTargetItemtypeName(): string;
79
79
*/
80
80
abstract protected function getTaggableFields ();
81
81
82
- abstract protected function getTemplateItemtypeName ();
83
-
84
82
const DESTINATION_ENTITY_CURRENT = 1 ;
85
83
const DESTINATION_ENTITY_REQUESTER = 2 ;
86
84
const DESTINATION_ENTITY_REQUESTER_DYN_FIRST = 3 ;
@@ -573,19 +571,4 @@ public function prepareInputForClone($input) {
573
571
return $ input ;
574
572
}
575
573
576
- protected static function getTemplateByName (string $ name ): int {
577
- global $ DB ;
578
-
579
- $ targetTemplateType = (new static ())->getTemplateItemtypeName ();
580
- $ targetTemplate = new $ targetTemplateType ();
581
- $ targetTemplate ->getFromDBByCrit ([
582
- 'name ' => $ DB ->escape ($ name ),
583
- ]);
584
-
585
- if ($ targetTemplate ->isNewItem ()) {
586
- return 0 ;
587
- }
588
-
589
- return $ targetTemplate ->getID ();
590
- }
591
574
}
You can’t perform that action at this time.
0 commit comments