protected function _generateFormFields($model)
    {
        $model = TableRegistry::get($model);
        $columns = ConnectionManager::get('default')->schemaCollection()->describe($model->table())->columns();

        $ignoredFields = [
            'created',
            'modified',
            'created_by',
            'modified_by',
            'password'
        ];

        $result = [];

        foreach ($columns as $column) {
            if (!in_array($column, $ignoredFields)) {
                $result[$column] = [];
            }
        }
        return $result;
    }
protected function _generateFormFields($model)
    {
        $model = TableRegistry::get($model);
        $columns = ConnectionManager::get('default')->schemaCollection()->describe($model->table())->columns();

        $ignoredFields = [
            'created',
            'modified',
            'created_by',
            'modified_by',
            'password'
        ];

        $result = [];

        foreach ($columns as $column) {
            if (!in_array($column, $ignoredFields)) {
                $result[$column] = [];
            }
        }
        return $result;
    }
protected function _generateFormFields ( $ model ) { $ model = TableRegistry :: get ( $ model ) ; $ columns = ConnectionManager :: get ( 'default' ) -> schemaCollection ( ) -> describe ( $ model -> table ( ) ) -> columns ( ) ; $ ignoredFields = [ 'created' , 'modified' , 'created_by' , 'modified_by' , 'password' ] ; $ result = [ ] ; foreach ( $ columns as $ column ) { if ( ! in_array ( $ column , $ ignoredFields ) ) { $ result [ $ column ] = [ ] ; } } return $ result ; }
If no formfields are given, this method will be called to generate a list of formfields.

@param \Cake\ORM\Table $model Model to rely on.
@return array
If no formfields are given this method will be called to generate a list of formfields .