PMA\libraries\DisplayResults::_getSpecialLinkUrl PHP Method

_getSpecialLinkUrl() private method

Get link for display special schema links
private _getSpecialLinkUrl ( string $column_value, array $row_info, string $field_name ) : string
$column_value string column value
$row_info array information about row
$field_name string column name
return string generated link
    private function _getSpecialLinkUrl($column_value, $row_info, $field_name)
    {
        $linking_url_params = array();
        $link_relations = $GLOBALS['special_schema_links'][mb_strtolower($this->__get('db'))][mb_strtolower($this->__get('table'))][$field_name];
        if (!is_array($link_relations['link_param'])) {
            $linking_url_params[$link_relations['link_param']] = $column_value;
        } else {
            // Consider only the case of creating link for column field
            // sql query that needs to be passed as url param
            $sql = 'SELECT `' . $column_value . '` FROM `' . $row_info[$link_relations['link_param'][1]] . '`.`' . $row_info[$link_relations['link_param'][2]] . '`';
            $linking_url_params[$link_relations['link_param'][0]] = $sql;
        }
        $divider = strpos($link_relations['default_page'], '?') ? '&' : '?';
        if (empty($link_relations['link_dependancy_params'])) {
            return $link_relations['default_page'] . URL::getCommonRaw($linking_url_params, $divider);
        }
        foreach ($link_relations['link_dependancy_params'] as $new_param) {
            // If param_info is an array, set the key and value
            // from that array
            if (is_array($new_param['param_info'])) {
                $linking_url_params[$new_param['param_info'][0]] = $new_param['param_info'][1];
                continue;
            }
            $linking_url_params[$new_param['param_info']] = $row_info[mb_strtolower($new_param['column_name'])];
            // Special case 1 - when executing routines, according
            // to the type of the routine, url param changes
            if (empty($row_info['routine_type'])) {
                continue;
            }
        }
        return $link_relations['default_page'] . URL::getCommonRaw($linking_url_params, $divider);
    }
DisplayResults