map() public static method
Builds a map (key-value pairs) from a multidimensional array or an array of objects. The $from and $to parameters specify the key names or property names to set up the map. Optionally, one can further group the map according to a grouping field $group. For example, $array = [
['id' => '123', 'name' => 'aaa', 'class' => 'x'],
['id' => '124', 'name' => 'bbb', 'class' => 'x'],
['id' => '345', 'name' => 'ccc', 'class' => 'y'],
];