<link rel="canonical" href="https://docs.woltlab.com/5.4/tutorial/series/part_4/">
<link rel="icon" href="../../../assets/default.favicon.ico">
- <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-7.1.2">
+ <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-7.1.3">
- <link rel="stylesheet" href="../../../assets/stylesheets/main.6f955dcd.min.css">
+ <link rel="stylesheet" href="../../../assets/stylesheets/main.e35208c4.min.css">
<link rel="stylesheet" href="../../../assets/stylesheets/palette.ef6f36e2.min.css">
</td></tr></table>
<p>The <code>com.woltlab.wcf.boxController</code> object type definition requires the provided class to implement <code>wcf\system\box\IBoxController</code>:</p>
<div class="titledCodeBox">
- <div class="codeBoxTitle"><code>files/lib/system/box/PersonListBoxController.class.php</code></div>
+ <div class="codeBoxTitle">
+ <code>files/lib/system/box/PersonListBoxController.class.php</code>
+ <a class="codeBoxTitleGitHubLink" href="https://github.com/WoltLab/docs.woltlab.com/tree/5.4/snippets/tutorial/tutorial-series/part-4/files/lib/system/box/PersonListBoxController.class.php" title="View on GitHub"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7a5 5 0 0 0-5 5 5 5 0 0 0 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8v2m9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.71-1.39 3.1-3.1 3.1h-4V17h4a5 5 0 0 0 5-5 5 5 0 0 0-5-5z"/></svg></span></a>
+ </div>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 1</span>
<span class="normal"> 2</span>
<span class="normal"> 3</span>
We will support filtering the people by their first and last name so that, for example, a box can be created listing all people with a specific first name.</p>
<p>The first step for condition support is to register a object type definition for the relevant conditions requiring the <code>IObjectListCondition</code> interface:</p>
<div class="titledCodeBox">
- <div class="codeBoxTitle"><code>objectTypeDefinition.xml</code></div>
+ <div class="codeBoxTitle">
+ <code>objectTypeDefinition.xml</code>
+ <a class="codeBoxTitleGitHubLink" href="https://github.com/WoltLab/docs.woltlab.com/tree/5.4/snippets/tutorial/tutorial-series/part-4/objectTypeDefinition.xml" title="View on GitHub"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7a5 5 0 0 0-5 5 5 5 0 0 0 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8v2m9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.71-1.39 3.1-3.1 3.1h-4V17h4a5 5 0 0 0 5-5 5 5 0 0 0-5-5z"/></svg></span></a>
+ </div>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
</td></tr></table>
<p><code>PersonFirstNameTextPropertyCondition</code> and <code>PersonLastNameTextPropertyCondition</code> only differ minimally so that we only focus on <code>PersonFirstNameTextPropertyCondition</code> here, which relies on the default implementation <code>AbstractObjectTextPropertyCondition</code> and only requires specifying different object properties:</p>
<div class="titledCodeBox">
- <div class="codeBoxTitle"><code>files/lib/system/condition/person/PersonFirstNameTextPropertyCondition.class.php</code></div>
+ <div class="codeBoxTitle">
+ <code>files/lib/system/condition/person/PersonFirstNameTextPropertyCondition.class.php</code>
+ <a class="codeBoxTitleGitHubLink" href="https://github.com/WoltLab/docs.woltlab.com/tree/5.4/snippets/tutorial/tutorial-series/part-4/files/lib/system/condition/person/PersonFirstNameTextPropertyCondition.class.php" title="View on GitHub"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7a5 5 0 0 0-5 5 5 5 0 0 0 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8v2m9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.71-1.39 3.1-3.1 3.1h-4V17h4a5 5 0 0 0 5-5 5 5 0 0 0-5-5z"/></svg></span></a>
+ </div>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 1</span>
<span class="normal"> 2</span>
<span class="normal"> 3</span>