src/RecordMapField.php
public static function available_map_fields($class)
	{
		if (!in_array($class, self::config()->allowed_classes) || !\ClassInfo::exists($class))
			return false;

		$available = \Config::inst()->get($class, 'public_fields') ? \Config::inst()->get($class, 'public_fields') : array_keys(singleton($class)->summaryFields());

		$fields = array_diff($available, self::config()->disable_map_fields);

		return count($fields) ? $fields : false;
	}
public static function available_map_fields($class)
	{
		if (!in_array($class, self::config()->allowed_classes) || !\ClassInfo::exists($class))
			return false;

		$available = \Config::inst()->get($class, 'public_fields') ? \Config::inst()->get($class, 'public_fields') : array_keys(singleton($class)->summaryFields());

		$fields = array_diff($available, self::config()->disable_map_fields);

		return count($fields) ? $fields : false;
	}
public static function available_map_fields ( $ class ) { if ( ! in_array ( $ class , self :: config ( ) -> allowed_classes ) || ! \ ClassInfo :: exists ( $ class ) ) return false ; $ available = \ Config :: inst ( ) -> get ( $ class , 'public_fields' ) ? \ Config :: inst ( ) -> get ( $ class , 'public_fields' ) : array_keys ( singleton ( $ class ) -> summaryFields ( ) ) ; $ fields = array_diff ( $ available , self :: config ( ) -> disable_map_fields ) ; return count ( $ fields ) ? $ fields : false ; }
Return an array of fields that can be mapped to a class name
Looks for public_fields set via config, otherwise defaults to summary_fields

@param string $class
@return array|bool
Return an array of fields that can be mapped to a class name Looks for public_fields set via config otherwise defaults to summary_fields