src/ngrest/ConfigBuilder.php
public function field($name, $alias = null, $i18n = false)
    {
        $this->config[$this->pointer][$name] = [
            'name' => $name,
            'i18n' => $i18n,
            'alias' => (is_null($alias)) ? $name : $alias,
            'type' => null,
            'extraField' => false,
        ];

        $this->field = $name;

        return $this;
    }
public function field($name, $alias = null, $i18n = false)
    {
        $this->config[$this->pointer][$name] = [
            'name' => $name,
            'i18n' => $i18n,
            'alias' => (is_null($alias)) ? $name : $alias,
            'type' => null,
            'extraField' => false,
        ];

        $this->field = $name;

        return $this;
    }
public function field ( $ name , $ alias = null , $ i18n = false ) { $ this -> config [ $ this -> pointer ] [ $ name ] = [ 'name' => $ name , 'i18n' => $ i18n , 'alias' => ( is_null ( $ alias ) ) ? $ name : $ alias , 'type' => null , 'extraField' => false , ] ; $ this -> field = $ name ; return $ this ; }
Define a field.

@param string $name
@param string $alias
@param boolean $i18n
@return \luya\admin\ngrest\ConfigBuilder
Define a field .