public function getClassesCreate($grid)
    {
        // Get explicit or fallback class list
        $classes = $this->getClasses();
        if (empty($classes) && $grid) {
            $classes = array($grid->getModelClass());
        }

        // Filter out classes without permission
        return array_filter($classes, function ($class) {
            return singleton($class)->canCreate();
        });
    }
public function getClassesCreate($grid)
    {
        // Get explicit or fallback class list
        $classes = $this->getClasses();
        if (empty($classes) && $grid) {
            $classes = array($grid->getModelClass());
        }

        // Filter out classes without permission
        return array_filter($classes, function ($class) {
            return singleton($class)->canCreate();
        });
    }
public function getClassesCreate ( $ grid ) { // Get explicit or fallback class list $ classes = $ this -> getClasses ( ) ; if ( empty ( $ classes ) && $ grid ) { $ classes = array ( $ grid -> getModelClass ( ) ) ; } // Filter out classes without permission return array_filter ( $ classes , function ( $ class ) { return singleton ( $ class ) -> canCreate ( ) ; } ) ; }
Gets the list of classes which can be created, with checks for permissions.
Will fallback to the default model class for the given DataGrid

@param DataGrid $grid
@return array
Gets the list of classes which can be created with checks for permissions . Will fallback to the default model class for the given DataGrid