fadd52076239aaeac3dfbed836581de77beaa857
[GitHub/WoltLab/WCF.git] /
1 <?php
2 declare(strict_types=1);
3 namespace wcf\system\form\builder\field\dependency;
4
5 /**
6 * Represents a dependency that requires the value of a field not to be empty.
7 *
8 * @author Matthias Schmidt
9 * @copyright 2001-2018 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @package WoltLabSuite\Core\System\Form\Builder\Field\Dependency
12 * @since 3.2
13 */
14 class NonEmptyFormFieldDependency extends AbstractFormFieldDependency {
15 /**
16 * @inheritDoc
17 */
18 protected $templateName = '__nonEmptyFormFieldDependency';
19
20 /**
21 * @inheritDoc
22 */
23 public function checkDependency(): bool {
24 return !empty($this->getField()->getValue());
25 }
26 }