private function createData()
    {
        $output = array();
        $hasTranslator = $this->translator instanceof TranslatorInterface;

        foreach ($this->options[self::LISTVIEW_PARAM_COLUMNS] as $configuration) {
            // Do processing only if column available
            if (isset($this->data[$configuration[self::LISTVIEW_PARAM_COLUMN]])) {
                if (isset($configuration[self::LISTVIEW_PARAM_VALUE]) && is_callable($configuration[self::LISTVIEW_PARAM_VALUE])) {
                    // Grab value from returned value
                    $value = $configuration[self::LISTVIEW_PARAM_VALUE]($configuration[self::LISTVIEW_PARAM_COLUMN], $this->data[$configuration[self::LISTVIEW_PARAM_COLUMN]]);
                } else {
                    $value = $this->data[$configuration[self::LISTVIEW_PARAM_COLUMN]];
                }

                // Need to translate?
                if (isset($configuration[self::LISTVIEW_PARAM_TRANSLATE]) && $configuration[self::LISTVIEW_PARAM_TRANSLATE] == true) {
                    $value = $this->translator->translate($value);
                }

                // Title
                if (isset($configuration[self::LISTVIEW_PARAM_TITLE])) {
                    $key = $configuration[self::LISTVIEW_PARAM_TITLE];
                } else {
                    // Fallback to column name
                    $key = TextUtils::normalizeColumn($configuration[self::LISTVIEW_PARAM_COLUMN]);
                }

                // Prepare key
                $key = $hasTranslator ? $this->translator->translate($key) : $key;

                $output[$key] = $value;
            }
        }

        return $output;
    }
private function createData()
    {
        $output = array();
        $hasTranslator = $this->translator instanceof TranslatorInterface;

        foreach ($this->options[self::LISTVIEW_PARAM_COLUMNS] as $configuration) {
            // Do processing only if column available
            if (isset($this->data[$configuration[self::LISTVIEW_PARAM_COLUMN]])) {
                if (isset($configuration[self::LISTVIEW_PARAM_VALUE]) && is_callable($configuration[self::LISTVIEW_PARAM_VALUE])) {
                    // Grab value from returned value
                    $value = $configuration[self::LISTVIEW_PARAM_VALUE]($configuration[self::LISTVIEW_PARAM_COLUMN], $this->data[$configuration[self::LISTVIEW_PARAM_COLUMN]]);
                } else {
                    $value = $this->data[$configuration[self::LISTVIEW_PARAM_COLUMN]];
                }

                // Need to translate?
                if (isset($configuration[self::LISTVIEW_PARAM_TRANSLATE]) && $configuration[self::LISTVIEW_PARAM_TRANSLATE] == true) {
                    $value = $this->translator->translate($value);
                }

                // Title
                if (isset($configuration[self::LISTVIEW_PARAM_TITLE])) {
                    $key = $configuration[self::LISTVIEW_PARAM_TITLE];
                } else {
                    // Fallback to column name
                    $key = TextUtils::normalizeColumn($configuration[self::LISTVIEW_PARAM_COLUMN]);
                }

                // Prepare key
                $key = $hasTranslator ? $this->translator->translate($key) : $key;

                $output[$key] = $value;
            }
        }

        return $output;
    }
private function createData ( ) { $ output = array ( ) ; $ hasTranslator = $ this -> translator instanceof TranslatorInterface ; foreach ( $ this -> options [ self :: LISTVIEW_PARAM_COLUMNS ] as $ configuration ) { // Do processing only if column available if ( isset ( $ this -> data [ $ configuration [ self :: LISTVIEW_PARAM_COLUMN ] ] ) ) { if ( isset ( $ configuration [ self :: LISTVIEW_PARAM_VALUE ] ) && is_callable ( $ configuration [ self :: LISTVIEW_PARAM_VALUE ] ) ) { // Grab value from returned value $ value = $ configuration [ self :: LISTVIEW_PARAM_VALUE ] ( $ configuration [ self :: LISTVIEW_PARAM_COLUMN ] , $ this -> data [ $ configuration [ self :: LISTVIEW_PARAM_COLUMN ] ] ) ; } else { $ value = $ this -> data [ $ configuration [ self :: LISTVIEW_PARAM_COLUMN ] ] ; } // Need to translate? if ( isset ( $ configuration [ self :: LISTVIEW_PARAM_TRANSLATE ] ) && $ configuration [ self :: LISTVIEW_PARAM_TRANSLATE ] == true ) { $ value = $ this -> translator -> translate ( $ value ) ; } // Title if ( isset ( $ configuration [ self :: LISTVIEW_PARAM_TITLE ] ) ) { $ key = $ configuration [ self :: LISTVIEW_PARAM_TITLE ] ; } else { // Fallback to column name $ key = TextUtils :: normalizeColumn ( $ configuration [ self :: LISTVIEW_PARAM_COLUMN ] ) ; } // Prepare key $ key = $ hasTranslator ? $ this -> translator -> translate ( $ key ) : $ key ; $ output [ $ key ] = $ value ; } } return $ output ; }
Prepares data by reading from configuration

@return array
Prepares data by reading from configuration