PMA\libraries\DisplayResults::_getDataCellForGeometryColumns PHP Méthode

_getDataCellForGeometryColumns() private méthode

Get data cell for geometry type fields
See also: _getTableBody()
private _getDataCellForGeometryColumns ( string $column, string $class, object $meta, array $map, array $_url_params, boolean $condition_field, object | string $transformation_plugin, string $default_function, string $transform_options, array $analyzed_sql_results ) : string
$column string the relevant column in data row
$class string the html class for column
$meta object the meta-information about this field
$map array the list of relations
$_url_params array the parameters for generate url
$condition_field boolean the column should highlighted or not
$transformation_plugin object | string the name of transformation function
$default_function string the default transformation function
$transform_options string the transformation parameters
$analyzed_sql_results array the analyzed query
Résultat string $cell the prepared data cell, html content
    private function _getDataCellForGeometryColumns($column, $class, $meta, $map, $_url_params, $condition_field, $transformation_plugin, $default_function, $transform_options, $analyzed_sql_results)
    {
        if (!isset($column) || is_null($column)) {
            $cell = $this->_buildNullDisplay($class, $condition_field, $meta);
            return $cell;
        }
        if ($column == '') {
            $cell = $this->_buildEmptyDisplay($class, $condition_field, $meta);
            return $cell;
        }
        // Display as [GEOMETRY - (size)]
        if ($_SESSION['tmpval']['geoOption'] == self::GEOMETRY_DISP_GEOM) {
            $geometry_text = $this->_handleNonPrintableContents(strtoupper(self::GEOMETRY_FIELD), $column, $transformation_plugin, $transform_options, $default_function, $meta, $_url_params);
            $cell = $this->_buildValueDisplay($class, $condition_field, $geometry_text);
            return $cell;
        }
        if ($_SESSION['tmpval']['geoOption'] == self::GEOMETRY_DISP_WKT) {
            // Prepare in Well Known Text(WKT) format.
            $where_comparison = ' = ' . $column;
            // Convert to WKT format
            $wktval = Util::asWKT($column);
            list($is_field_truncated, $wktval, ) = $this->_getPartialText($wktval);
            $cell = $this->_getRowData($class, $condition_field, $analyzed_sql_results, $meta, $map, $wktval, $transformation_plugin, $default_function, '', $where_comparison, $transform_options, $is_field_truncated, '');
            return $cell;
        }
        // Prepare in  Well Known Binary (WKB) format.
        if ($_SESSION['tmpval']['display_binary']) {
            $where_comparison = ' = ' . $column;
            $wkbval = substr(bin2hex($column), 8);
            list($is_field_truncated, $wkbval, ) = $this->_getPartialText($wkbval);
            $cell = $this->_getRowData($class, $condition_field, $analyzed_sql_results, $meta, $map, $wkbval, $transformation_plugin, $default_function, '', $where_comparison, $transform_options, $is_field_truncated, '');
            return $cell;
        }
        $wkbval = $this->_handleNonPrintableContents(self::BINARY_FIELD, $column, $transformation_plugin, $transform_options, $default_function, $meta, $_url_params);
        $cell = $this->_buildValueDisplay($class, $condition_field, $wkbval);
        return $cell;
    }
DisplayResults