public function mapRoles(array $data)
    {
        $roleData = array();
        foreach ($data as $row) {
            $roleData[$row['ezrole_id']][] = $row;
        }

        $roles = array();
        foreach ($roleData as $data) {
            $roles[] = $this->mapRole($data);
        }

        return $roles;
    }
public function mapRoles(array $data)
    {
        $roleData = array();
        foreach ($data as $row) {
            $roleData[$row['ezrole_id']][] = $row;
        }

        $roles = array();
        foreach ($roleData as $data) {
            $roles[] = $this->mapRole($data);
        }

        return $roles;
    }
public function mapRoles ( array $ data ) { $ roleData = array ( ) ; foreach ( $ data as $ row ) { $ roleData [ $ row [ 'ezrole_id' ] ] [ ] = $ row ; } $ roles = array ( ) ; foreach ( $ roleData as $ data ) { $ roles [ ] = $ this -> mapRole ( $ data ) ; } return $ roles ; }
Map data for a set of roles.

@param array $data

@return \eZ\Publish\SPI\Persistence\User\Role[]
Map data for a set of roles .