ArrayAccessDefinitionTrait.php in UI Patterns 8
File
src/Definition/ArrayAccessDefinitionTrait.php
View source
<?php
namespace Drupal\ui_patterns\Definition;
trait ArrayAccessDefinitionTrait {
public function offsetExists($offset) {
return array_key_exists($offset, $this->definition);
}
public function offsetGet($offset) {
return isset($this->definition[$offset]) ? $this->definition[$offset] : NULL;
}
public function offsetSet($offset, $value) {
$this->definition[$offset] = $value;
}
public function offsetUnset($offset) {
unset($this->definition[$offset]);
}
}