getClasses() public method

Gets the classes that can be created using this button, defaulting to the model class and its subclasses.
public getClasses ( GridField $grid ) : array
$grid GridField
return array a map of class name to title
 public function testGetClasses()
 {
     $grid = new GridField('TestGridField');
     $grid->setModelClass('GridFieldAddNewMultiClassTest_A');
     $component = new GridFieldAddNewMultiClass();
     $this->assertEquals(array('GridFieldAddNewMultiClassTest_A' => 'A', 'GridFieldAddNewMultiClassTest_B' => 'B', 'GridFieldAddNewMultiClassTest_C' => 'C'), $component->getClasses($grid), 'Subclasses are populated by default and sorted');
     $component->setClasses(array('GridFieldAddNewMultiClassTest_B' => 'Custom Title', 'GridFieldAddNewMultiClassTest_A'));
     $this->assertEquals(array('GridFieldAddNewMultiClassTest_B' => 'Custom Title', 'GridFieldAddNewMultiClassTest_A' => 'A'), $component->getClasses($grid), 'Sorting and custom titles can be specified');
 }
 public function getClasses(GridField $grid)
 {
     $classes = parent::getClasses($grid);
     if ($classes) {
         asort($classes);
     }
     return $classes;
 }
 public function getClasses(GridField $grid)
 {
     $classes = parent::getClasses($grid);
     return $classes;
 }
 public function getClasses(GridField $grid)
 {
     $classes = parent::getClasses($grid);
     unset($classes['ElementVirtualLinked']);
     return $classes;
 }