@param bool $readonly

@return $this
358688
public function setReadonly($readonly)
    {
        parent::setReadonly($readonly);
        $this->getState()->Readonly = $readonly;
        return $this;
    }
1069521
public function remove($name, $delimiter = self::DELIMITER) {
		if ($this->_locked) {
			throw new ReadOnly('Config is read only');
		}
		
		if (strpos($name, $delimiter) === false) {
			unset($this->_data[$name]);
			
			return $this;
		}
		
		list ($first, $rest) = explode($delimiter, $name, 2);
		
		if (isset($this->_data[$first]) && $this->_data[$first] instanceof self) {
			$this->_data[$first]->remove($rest, $delimiter);
		}
		
		return $this;
	}
1000753
public function performReadonlyTransformation()
    {
        $readonlyClassName = static::class . '_Readonly';

        if (ClassInfo::exists($readonlyClassName)) {
            $clone = $this->castedCopy($readonlyClassName);
        } else {
            $clone = $this->castedCopy(ReadonlyField::class);
        }

        $clone->setReadonly(true);

        return $clone;
    }
1186357
public function set($name, $value)
    {
        if ($this->readonly) {
            throw new ReadonlyException();
        }

        $this->headers[$name] = $value;
    }
1126889
public boolean open(final boolean readOnly) {
		if (isOpen()) {
			close();
		}
		if (log.isDebugEnabled()) {
			log.debug("open(" + file + ")");
		}
		try {
			raf = new RandomAccessFile(file, readOnly ? "r" : "rw");
			fileChannel = raf.getChannel();
			if (useLock) {
				lock(readOnly);
			}
		} catch (Exception e) {
			log.error("Exception in open()", e);
			try {
				unlock();
			} catch (Exception ign) {
			}
			try {
				fileChannel.close();
			} catch (Exception ign) {
			}
			try {
				raf.close();
			} catch (Exception ign) {
			}
			raf = null;
			fileChannel = null;
		}
		validState = isOpen();
		return validState;
	}
902348
public function read($read = false)
    {
        $this->read = true;

        if ($read === false) {
            $this->read = false;
        }

        return $this;
    }
1085285
public function setActiveOnly($flag = true)
    {
        $flag = (bool)$flag;
        if ($this->activeOnly !== $flag) {
            $this->clear();
            $this->activeOnly = $flag;
        }
        return $this;
    }
6193
public function setReadOnly( $state ) {
		$this->readOnly = (bool)$state;
		if ( $this->readOnly ) {
			$this->input->setAttributes( [ 'readonly' => 'readonly' ] );
		} else {
			$this->input->removeAttributes( [ 'readonly' ] );
		}
		return $this;
	}
364502
public function readonly($field)
    {
        if (is_string($field)) {
            $field = explode(',', $field);
        }

        $this->readonly = $field;

        return $this;
    }
723509
public function disableView(bool $disable = true)
    {
        if ($disable) {
            array_delete($this->tools, 'view');
        } elseif (!in_array('view', $this->tools)) {
            array_push($this->tools, 'view');
        }

        return $this;
    }
1098043
public function markReadOnly(): void
    {
        $this->readOnly = true;

        /** @var Config $value */
        foreach ($this->data as $value) {
            if ($value instanceof self) {
                $value->markReadOnly();
            }
        }
    }
564262
public function beginTransaction($withConsistentSnapshot = false, $readOnly = false)
    {
        $filesToBegin = array();
        foreach ($this->filesStack as $files) {
            foreach ($files as $filePath => $file) {
                /* @var $file TransactionalFile */

                $filesToBegin[$filePath] = $file;
            }
        }

        foreach ($filesToBegin as $filePath => $file) {
            /* @var $file TransactionalFile */

            $file->beginTransaction();
        }

        $this->createdFilepathsStack[] = array();
        $this->deletedFilepathsStack[] = array();
        $this->filesStack[] = array();
        $this->directoriesStack[] = array();
    }
1111892
public function setSearchable($searchable)
    {
        if ($searchable === 'true') {
            $this->searchable = true;

            return $this;
        }
        $this->searchable = false;

        return $this;
    }
1058266
public function setLocalOnly($value = false)
    {
        $this->localOnly = $value;
        $this->scope = $value ? $this->worksheet : null;
        return $this;
    }
985544
public function setSourceData(array $source) {
		if ($this->_locked) {
			throw new ReadOnly('Config is read only');
		}
		
		foreach ($source as $key => $part) {
			if (is_array($part)) {
				$this->_data[$key] = new static($part, false);
			} else {
				$this->_data[$key] = $part;
			}
		}
		
		return $this;
	}
1346310
public function withReadable(bool $readable): self
    {
        $metadata = clone $this;
        $metadata->readable = $readable;

        return $metadata;
    }
1036330
public function performReadonlyTransformation()
    {
        $field = new CheckboxField_Readonly($this->name, $this->title, $this->value);
        $field->setForm($this->form);
        return $field;
    }