Apply PSR-12 code style (#3886)
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / form / builder / field / IPlaceholderFormField.class.php
1 <?php
2
3 namespace wcf\system\form\builder\field;
4
5 /**
6 * Represents a form field that supports a placeholder value.
7 *
8 * @author Matthias Schmidt
9 * @copyright 2001-2019 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @package WoltLabSuite\Core\System\Form\Builder\Field
12 * @since 5.2
13 */
14 interface IPlaceholderFormField extends IFormField
15 {
16 /**
17 * Returns the placeholder value of this field or `null` if no placeholder has
18 * been set.
19 *
20 * @return null|string
21 */
22 public function getPlaceholder();
23
24 /**
25 * Sets the placeholder value of this field using the given language item
26 * and returns this element. If `null` is passed, the placeholder value is
27 * removed.
28 *
29 * @param null|string $languageItem language item containing the placeholder or `null` to unset placeholder
30 * @param array $variables additional variables used when resolving the language item
31 * @return static this field
32 *
33 * @throws \InvalidArgumentException if the given value is invalid
34 */
35 public function placeholder($languageItem = null, array $variables = []);
36 }