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

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

- Page: https://pluginprobe.com/plugins/give/4.16.8.1/code/src/Framework/FieldsAPI/Concerns/IsReadOnly.php
- Raw: https://pluginprobe.com/plugins/give/4.16.8.1/raw/src/Framework/FieldsAPI/Concerns/IsReadOnly.php
- Modified: 2021-11-23T23:55:18+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/IsReadOnly.php#L10-L20`.

```php
<?php

namespace Give\Framework\FieldsAPI\Concerns;

trait IsReadOnly
{

    /** @var bool */
    protected $readOnly = false;

    /**
     * @param bool $readOnly
     *
     * @return $this
     */
    public function readOnly($readOnly = true)
    {
        $this->readOnly = $readOnly;

        return $this;
    }

    /**
     * @return bool
     */
    public function isReadOnly()
    {
        return $this->readOnly;
    }
}

```
