DataDefinition::setReadOnly

public DataDefinition::setReadOnly($read_only)

Sets whether the data is read-only.

Parameters

bool $read_only: Whether the data is read-only.

Return value

static The object itself for chaining.

File

core/lib/Drupal/Core/TypedData/DataDefinition.php, line 138

Class

DataDefinition
A typed data definition class for defining data based on defined data types.

Namespace

Drupal\Core\TypedData

Code

public function setReadOnly($read_only) {
  $this->definition['read-only'] = $read_only;
  return $this;
}
doc_Drupal
2016-10-29 09:00:09
Comments
Leave a Comment

Please login to continue.