src/Field.php
public function key(string $key = null)
    {
        if ($key) {
            $this->field['key'] = $key;

            return $this;
        }

        return $this->field['key'];
    }
public function key(string $key = null)
    {
        if ($key) {
            $this->field['key'] = $key;

            return $this;
        }

        return $this->field['key'];
    }
public function key ( string $ key = null ) { if ( $ key ) { $ this -> field [ 'key' ] = $ key ; return $ this ; } return $ this -> field [ 'key' ] ; }
Set or get the key of a field. Returns chainable instance if a key is
supplied, otherwise returns a string of the key.

@param string $key
@return Agencms\Core\Field or string
Set or get the key of a field . Returns chainable instance if a key is supplied otherwise returns a string of the key .