1 | <?php |
||
23 | class SpecialSetLabel extends SpecialModifyTerm { |
||
|
|||
24 | |||
25 | public function __construct( |
||
41 | |||
42 | public static function factory(): self { |
||
43 | $wikibaseRepo = WikibaseRepo::getDefaultInstance(); |
||
44 | |||
45 | $settings = $wikibaseRepo->getSettings(); |
||
46 | $copyrightView = new SpecialPageCopyrightView( |
||
47 | new CopyrightMessageBuilder(), |
||
48 | $settings->getSetting( 'dataRightsUrl' ), |
||
49 | $settings->getSetting( 'dataRightsText' ) |
||
50 | ); |
||
51 | |||
52 | return new self( |
||
53 | $copyrightView, |
||
54 | $wikibaseRepo->getSummaryFormatter(), |
||
55 | $wikibaseRepo->getEntityTitleLookup(), |
||
56 | $wikibaseRepo->newEditEntityFactory(), |
||
57 | $wikibaseRepo->getEntityPermissionChecker() |
||
58 | ); |
||
59 | } |
||
60 | |||
61 | public function doesWrites() { |
||
64 | |||
65 | /** |
||
66 | * @see SpecialModifyTerm::validateInput |
||
67 | * |
||
68 | * @return bool |
||
69 | */ |
||
70 | protected function validateInput() { |
||
77 | |||
78 | /** |
||
79 | * @see SpecialModifyTerm::getPostedValue() |
||
80 | * |
||
81 | * @return string|null |
||
82 | */ |
||
83 | protected function getPostedValue() { |
||
86 | |||
87 | /** |
||
88 | * @see SpecialModifyTerm::getValue() |
||
89 | * |
||
90 | * @param EntityDocument $entity |
||
91 | * @param string $languageCode |
||
92 | * |
||
93 | * @throws InvalidArgumentException |
||
94 | * @return string |
||
95 | */ |
||
96 | protected function getValue( EntityDocument $entity, $languageCode ) { |
||
109 | |||
110 | /** |
||
111 | * @see SpecialModifyTerm::setValue() |
||
112 | * |
||
113 | * @param EntityDocument $entity |
||
114 | * @param string $languageCode |
||
115 | * @param string $value |
||
116 | * |
||
117 | * @return Summary |
||
118 | */ |
||
119 | protected function setValue( EntityDocument $entity, $languageCode, $value ) { |
||
135 | |||
136 | } |
||
137 |