public function initAction(Model $m, $fields = null)
    {
        $keys = $fields ? array_flip($fields) : null;

        $data = array_map(function ($r) use ($m, $keys) {
            return $this->typecastLoadRow($m, $keys ? array_intersect_key($r, $keys) : $r);
        }, $this->data[$m->table]);

        return new \atk4\data\Action\Iterator($data);
    }
public function initAction(Model $m, $fields = null)
    {
        $keys = $fields ? array_flip($fields) : null;

        $data = array_map(function ($r) use ($m, $keys) {
            return $this->typecastLoadRow($m, $keys ? array_intersect_key($r, $keys) : $r);
        }, $this->data[$m->table]);

        return new \atk4\data\Action\Iterator($data);
    }
public function initAction ( Model $ m , $ fields = null ) { $ keys = $ fields ? array_flip ( $ fields ) : null ; $ data = array_map ( function ( $ r ) use ( $ m , $ keys ) { return $ this -> typecastLoadRow ( $ m , $ keys ? array_intersect_key ( $ r , $ keys ) : $ r ) ; } , $ this -> data [ $ m -> table ] ) ; return new \ atk4 \ data \ Action \ Iterator ( $ data ) ; }
Typecast data and return Iterator of data array.

@param Model $m
@param array $fields

@return \atk4\data\Action\Iterator
Typecast data and return Iterator of data array .