public function getEditableFieldClasses($includeLiterals = true)
    {
        $classes = ClassInfo::getValidSubClasses(EditableFormField::class);

        // Remove classes we don't want to display in the dropdown.
        $editableFieldClasses = [];
        foreach ($classes as $class) {
            // Skip abstract / hidden classes
            if (Config::inst()->get($class, 'abstract', Config::UNINHERITED)
                || Config::inst()->get($class, 'hidden')
            ) {
                continue;
            }

            if (!$includeLiterals && Config::inst()->get($class, 'literal')) {
                continue;
            }

            $singleton = singleton($class);
            if (!$singleton->canCreate()) {
                continue;
            }

            $editableFieldClasses[$class] = $singleton->i18n_singular_name();
        }

        asort($editableFieldClasses);
        return $editableFieldClasses;
    }
public function getEditableFieldClasses($includeLiterals = true)
    {
        $classes = ClassInfo::getValidSubClasses(EditableFormField::class);

        // Remove classes we don't want to display in the dropdown.
        $editableFieldClasses = [];
        foreach ($classes as $class) {
            // Skip abstract / hidden classes
            if (Config::inst()->get($class, 'abstract', Config::UNINHERITED)
                || Config::inst()->get($class, 'hidden')
            ) {
                continue;
            }

            if (!$includeLiterals && Config::inst()->get($class, 'literal')) {
                continue;
            }

            $singleton = singleton($class);
            if (!$singleton->canCreate()) {
                continue;
            }

            $editableFieldClasses[$class] = $singleton->i18n_singular_name();
        }

        asort($editableFieldClasses);
        return $editableFieldClasses;
    }
public function getEditableFieldClasses ( $ includeLiterals = true ) { $ classes = ClassInfo :: getValidSubClasses ( EditableFormField :: class ) ; // Remove classes we don't want to display in the dropdown. $ editableFieldClasses = [ ] ; foreach ( $ classes as $ class ) { // Skip abstract / hidden classes if ( Config :: inst ( ) -> get ( $ class , 'abstract' , Config :: UNINHERITED ) || Config :: inst ( ) -> get ( $ class , 'hidden' ) ) { continue ; } if ( ! $ includeLiterals && Config :: inst ( ) -> get ( $ class , 'literal' ) ) { continue ; } $ singleton = singleton ( $ class ) ; if ( ! $ singleton -> canCreate ( ) ) { continue ; } $ editableFieldClasses [ $ class ] = $ singleton -> i18n_singular_name ( ) ; } asort ( $ editableFieldClasses ) ; return $ editableFieldClasses ; }
Get the list of classes that can be selected and used as data-values

@param $includeLiterals Set to false to exclude non-data fields
@return array
Get the list of classes that can be selected and used as data - values