# give/4.16.8.1/src/Framework/FieldsAPI/Concerns/HasLabel.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.8.1. 30 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.8.1/code/src/Framework/FieldsAPI/Concerns/HasLabel.php
- Raw: https://pluginprobe.com/plugins/give/4.16.8.1/raw/src/Framework/FieldsAPI/Concerns/HasLabel.php
- Modified: 2023-01-18T19:19:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.8.1/code/src/Framework/FieldsAPI/Concerns/HasLabel.php#L10-L20`.

```php
<?php

namespace Give\Framework\FieldsAPI\Concerns;

trait HasLabel
{
    /** @var string */
    protected $label;

    /**
     * @since 2.24.0 add types
     */
    public function label(string $label): self
    {
        $this->label = $label;

        return $this;
    }

    /**
     * @since 2.24.0 add types
     *
     * @return string|null
     */
    public function getLabel()
    {
        return $this->label;
    }
}

```
