}
/**
- * Returns the name of the interface the entered class must implement.
+ * Sets the name of the interface the entered class must implement and returns
+ * this field.
+ *
+ * If no description has been set yet, `wcf.form.field.className.description.interface`
+ * is automatically used for the description.
*
* @param string $interface name of the interface the entered class must implement
* @return static this field
$this->__implementedInterface = $interface;
+ if ($this->getDescription() === null) {
+ $this->description(
+ 'wcf.form.field.className.description.interface',
+ ['interface' => $this->__implementedInterface]
+ );
+ }
+
return $this;
}
<category name="wcf.form">
<item name="wcf.form.field.className"><![CDATA[Klasse]]></item>
+ <item name="wcf.form.field.className.description.interface"><![CDATA[Die angegebene Klasse (ohne Backslash als erstes Zeichen) muss das Interface <code>{$interface}</code> implementieren.]]></item>
<item name="wcf.form.field.className.error.interface"><![CDATA[Die angegebene Klasse{if $language|isset} ({$language}){/if} implementiert nicht das Interface <code>{$interface}</code>.]]></item>
<item name="wcf.form.field.className.error.isInstantiable"><![CDATA[Die angegebene Klasse{if $language|isset} ({$language}){/if} ist nicht instanziierbar.]]></item>
<item name="wcf.form.field.className.error.leadingBackslash"><![CDATA[Die angegebene Klasse{if $language|isset} ({$language}){/if} darf keinen führenden Backslash besitzen.]]></item>
<category name="wcf.form">
<item name="wcf.form.field.className"><![CDATA[Class]]></item>
+ <item name="wcf.form.field.className.description.interface"><![CDATA[The entered class (without leading backslash) must implement the interface <code>{$interface}</code>.]]></item>
<item name="wcf.form.field.className.error.interface"><![CDATA[The entered class{if $language|isset} ({$language}){/if} does not implement the interface <code>{$interface}</code>.]]></item>
<item name="wcf.form.field.className.error.isInstantiable"><![CDATA[The entered class{if $language|isset} ({$language}){/if} is not instantiable.]]></item>
<item name="wcf.form.field.className.error.leadingBackslash"><![CDATA[The entered class name{if $language|isset} ({$language}){/if} must not have a leading backslash.]]></item>