public function getUniqueFormatters(bool $include_excluded_columns = false): ArrayObject
    {
        $unique = new ArrayObject();

        $formatters = $this->getFormatters();
        foreach ($formatters as $column => $formatter) {
            if ($include_excluded_columns || !$this->get($column)->isExcluded()) {
                $hash = spl_object_hash($formatter);
                if (!$unique->offsetExists($hash)) {
                    $tmp = new ArrayObject([
                                                'formatter' => $formatter,
                                                'columns' => new ArrayObject([$column])
                    ]);
                    $unique->offsetSet($hash, $tmp);
                } else {
                    $unique->offsetGet($hash)->offsetGet('columns')->append($column);
                }
            }
        }

        return $unique;
    }
public function getUniqueFormatters(bool $include_excluded_columns = false): ArrayObject
    {
        $unique = new ArrayObject();

        $formatters = $this->getFormatters();
        foreach ($formatters as $column => $formatter) {
            if ($include_excluded_columns || !$this->get($column)->isExcluded()) {
                $hash = spl_object_hash($formatter);
                if (!$unique->offsetExists($hash)) {
                    $tmp = new ArrayObject([
                                                'formatter' => $formatter,
                                                'columns' => new ArrayObject([$column])
                    ]);
                    $unique->offsetSet($hash, $tmp);
                } else {
                    $unique->offsetGet($hash)->offsetGet('columns')->append($column);
                }
            }
        }

        return $unique;
    }
public function getUniqueFormatters ( bool $ include_excluded_columns = false ) : ArrayObject { $ unique = new ArrayObject ( ) ; $ formatters = $ this -> getFormatters ( ) ; foreach ( $ formatters as $ column => $ formatter ) { if ( $ include_excluded_columns || ! $ this -> get ( $ column ) -> isExcluded ( ) ) { $ hash = spl_object_hash ( $ formatter ) ; if ( ! $ unique -> offsetExists ( $ hash ) ) { $ tmp = new ArrayObject ( [ 'formatter' => $ formatter , 'columns' => new ArrayObject ( [ $ column ] ) ] ) ; $ unique -> offsetSet ( $ hash , $ tmp ) ; } else { $ unique -> offsetGet ( $ hash ) -> offsetGet ( 'columns' ) -> append ( $ column ) ; } } } return $ unique ; }
This method returns unique formatters set in the column model
in an ArrayObject.


@param bool $include_excluded_columns

@see self::getFormatters()
This method returns unique formatters set in the column model in an ArrayObject .