jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/365037 )

Change subject: Populate "Ask out" (modeling 3) Lexeme for demo system
......................................................................


Populate "Ask out" (modeling 3) Lexeme for demo system

Bug: T168373
Change-Id: Id8fb37ab057f9d1a00ed7756b40493e569089811
---
M src/Content/LexemeContent.php
A src/DemoData/AskOut3Populator.php
2 files changed, 27 insertions(+), 0 deletions(-)

Approvals:
  WMDE-leszek: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/Content/LexemeContent.php b/src/Content/LexemeContent.php
index 774c125..dfd3e5f 100644
--- a/src/Content/LexemeContent.php
+++ b/src/Content/LexemeContent.php
@@ -64,6 +64,8 @@
                        ( new DemoData\AskOut1Populator() )->populate( $lexeme 
);
                } elseif ( $id === DemoData\Id::L_ASK_2 ) {
                        ( new DemoData\AskOut2Populator() )->populate( $lexeme 
);
+               } elseif ( $id === DemoData\Id::L_ASK_OUT ) {
+                       ( new DemoData\AskOut3Populator() )->populate( $lexeme 
);
                } else {
                        ( new DemoData\DefaultPopulator() )->populate( $lexeme 
);
                }
diff --git a/src/DemoData/AskOut3Populator.php 
b/src/DemoData/AskOut3Populator.php
new file mode 100644
index 0000000..28851bd
--- /dev/null
+++ b/src/DemoData/AskOut3Populator.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Wikibase\Lexeme\DemoData;
+
+use Wikibase\Lexeme\DataModel\Lexeme;
+use Wikibase\Lexeme\Tests\DataModel\NewSense;
+
+class AskOut3Populator {
+
+       public function populate( Lexeme $lexeme ) {
+               $defaultSense = $this->buildDefaultSense();
+
+               $lexeme->setSenses( [ $defaultSense ] );
+       }
+
+       /**
+        * @return \Wikibase\Lexeme\DataModel\Sense
+        */
+       private function buildDefaultSense() {
+               return NewSense::havingId( 'S1' )
+                       ->withGloss( 'en', 'To request a romantic date' )
+                       ->build();
+       }
+
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/365037
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8fb37ab057f9d1a00ed7756b40493e569089811
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Aleksey Bekh-Ivanov (WMDE) <[email protected]>
Gerrit-Reviewer: WMDE-leszek <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to