public static function isTextFormatterUsed($text_formatter_handle)
    {
        $fields = Symphony::Database()->fetchCol('type', "SELECT DISTINCT `type` FROM `tbl_fields` WHERE `type` NOT IN ('author', 'checkbox', 'date', 'input', 'select', 'taglist', 'upload')");

        if (!empty($fields)) {
            foreach ($fields as $field) {
                try {
                    $table = Symphony::Database()->fetchVar('count', 0, sprintf(
                        "SELECT COUNT(*) AS `count`
                        FROM `tbl_fields_%s`
                        WHERE `formatter` = '%s'",
                        Symphony::Database()->cleanValue($field),
                        $text_formatter_handle
                    ));
                } catch (DatabaseException $ex) {
                    // Table probably didn't have that column
                }

                if ($table > 0) {
                    return true;
                }
            }
        }

        return false;
    }
public static function isTextFormatterUsed($text_formatter_handle)
    {
        $fields = Symphony::Database()->fetchCol('type', "SELECT DISTINCT `type` FROM `tbl_fields` WHERE `type` NOT IN ('author', 'checkbox', 'date', 'input', 'select', 'taglist', 'upload')");

        if (!empty($fields)) {
            foreach ($fields as $field) {
                try {
                    $table = Symphony::Database()->fetchVar('count', 0, sprintf(
                        "SELECT COUNT(*) AS `count`
                        FROM `tbl_fields_%s`
                        WHERE `formatter` = '%s'",
                        Symphony::Database()->cleanValue($field),
                        $text_formatter_handle
                    ));
                } catch (DatabaseException $ex) {
                    // Table probably didn't have that column
                }

                if ($table > 0) {
                    return true;
                }
            }
        }

        return false;
    }
public static function isTextFormatterUsed ( $ text_formatter_handle ) { $ fields = Symphony :: Database ( ) -> fetchCol ( 'type' , "SELECT DISTINCT `type` FROM `tbl_fields` WHERE `type` NOT IN ('author', 'checkbox', 'date', 'input', 'select', 'taglist', 'upload')" ) ; if ( ! empty ( $ fields ) ) { foreach ( $ fields as $ field ) { try { $ table = Symphony :: Database ( ) -> fetchVar ( 'count' , 0 , sprintf ( "SELECT COUNT(*) AS `count`
                        FROM `tbl_fields_%s`
                        WHERE `formatter` = '%s'" , Symphony :: Database ( ) -> cleanValue ( $ field ) , $ text_formatter_handle ) ) ; } catch ( DatabaseException $ ex ) { // Table probably didn't have that column } if ( $ table > 0 ) { return true ; } } } return false ; }
Check if a specific text formatter is used by a Field

@since Symphony 2.3
@param string $text_formatter_handle
The handle of the `TextFormatter`
@return boolean
true if used, false if not
Check if a specific text formatter is used by a Field