Add source code for part 5 of tutorial series
[GitHub/WoltLab/woltlab.github.io.git] / snippets / tutorial / tutorial-series / part-5 / files / lib / system / condition / person / PersonLastNameTextPropertyCondition.class.php
diff --git a/snippets/tutorial/tutorial-series/part-5/files/lib/system/condition/person/PersonLastNameTextPropertyCondition.class.php b/snippets/tutorial/tutorial-series/part-5/files/lib/system/condition/person/PersonLastNameTextPropertyCondition.class.php
new file mode 100644 (file)
index 0000000..8c06314
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+
+namespace wcf\system\condition\person;
+
+use wcf\data\person\Person;
+use wcf\system\condition\AbstractObjectTextPropertyCondition;
+
+/**
+ * Condition implementation for the last name of a person.
+ *
+ * @author  Matthias Schmidt
+ * @copyright   2001-2021 WoltLab GmbH
+ * @license WoltLab License <http://www.woltlab.com/license-agreement.html>
+ * @package WoltLabSuite\Core\System\Condition
+ */
+class PersonLastNameTextPropertyCondition extends AbstractObjectTextPropertyCondition
+{
+    /**
+     * @inheritDoc
+     */
+    protected $className = Person::class;
+
+    /**
+     * @inheritDoc
+     */
+    protected $description = 'wcf.person.condition.lastName.description';
+
+    /**
+     * @inheritDoc
+     */
+    protected $fieldName = 'personLastName';
+
+    /**
+     * @inheritDoc
+     */
+    protected $label = 'wcf.person.lastName';
+
+    /**
+     * @inheritDoc
+     */
+    protected $propertyName = 'lastName';
+
+    /**
+     * @inheritDoc
+     */
+    protected $supportsMultipleValues = true;
+}