Elastica\Index\Settings::setReadOnly PHP Method

setReadOnly() public method

Sets the index to read only.
public setReadOnly ( boolean $readOnly = true ) : Response
$readOnly boolean (default = true)
return Elastica\Response
    public function setReadOnly($readOnly = true)
    {
        return $this->set(['blocks.write' => $readOnly]);
    }