Returns the name of a field for displaying

@param array $details
@return string
197430
protected function getFieldNameForDisplay($details)
    {
        $tableUniqueId = $details['TABLE_SCHEMA'] . '.' . $details['TABLE_NAME'];
        if ($details['COLUMN_COMMENT'] != '') {
            return $details['COLUMN_COMMENT'];
        } elseif (isset($this->advCache['tableStructureLocales'][$tableUniqueId][$details['COLUMN_NAME']])) {
            return $this->advCache['tableStructureLocales'][$tableUniqueId][$details['COLUMN_NAME']];
        }
        return $details['COLUMN_NAME'];
    }
172003
public function getInputName()
  {
    $n = false;
    if ($f = $this->getForm()) {
      $n = $f->getName();
    }

    $inp = $this->getField();

    return $n ? $n . '[' . $inp . ']' : $inp;
  }
1058139
public function getDetailFieldsConfig()
    {
        $config = $this->owner->getDefaultDetailFieldsConfig();
        
        if (is_array($this->owner->config()->detail_fields)) {
            
            foreach ($this->owner->config()->detail_fields as $name => $spec) {
                
                if (!$spec) {
                    unset($config[$name]);
                }
                
            }
            
            $config = array_merge_recursive($config, $this->owner->config()->detail_fields);
            
        }
        
        return $config;
    }
89001
public function formatContactDetails(ClientContactDetailsInterface $details, $lineSeparator = self::LINES_SEPARATOR)
    {
        $lines   = [];
        $lines[] = sprintf('%s %s', $details->getFirstName(), $details->getLastName());
        $lines[] = sprintf('%s %s', $details->getPhone(), $details->getSecondaryPhone());
        $lines[] = $details->getEmail();
        
        return implode($lineSeparator, $lines);
    }
564662
public function get_details($short = '') {
        global $DB, $OUTPUT;
        $output = array();
        foreach ($this->params as $p) {
            $coursename = $DB->get_field('course', 'fullname', array('id' => $p['course']));
            if (!$coursename) {
                $str = $OUTPUT->error_text(get_string('error:nosuchcourse', 'badges'));
            } else {
                $str = html_writer::tag('b', '"' . $coursename . '"');
                if (isset($p['bydate'])) {
                    $str .= get_string('criteria_descr_bydate', 'badges', userdate($p['bydate'], get_string('strftimedate', 'core_langconfig')));
                }
                if (isset($p['grade'])) {
                    $str .= get_string('criteria_descr_grade', 'badges', $p['grade']);
                }
            }
            $output[] = $str;
        }

        if ($short) {
            return implode(', ', $output);
        } else {
            return html_writer::alist($output, array(), 'ul');
        }
    }
400178
protected function displayJson(array $details)
    {
        $errors = 0;

        array_walk(
            $details,
            function (&$info) use (&$errors) {
                $info['file'] = (string) $info['file'];
                unset($info['template']);

                if (!$info['valid']) {
                    $info['message'] = $info['exception']->getMessage();
                    unset($info['exception']);
                    $errors++;
                }
            }
        );

        $this->line(json_encode($details, JSON_PRETTY_PRINT));

        return min($errors, 1);
    }
737540
public function upDownButton(array $details = []): string
    {
        return $this->generateCollectionButton($this->buttons['down'], $details) . $this->generateCollectionButton($this->buttons['up'], $details);
    }
1067392
private function getOtherFieldNameInfo() {
		if ($this->otherInfo == null) {
			$propertyReader = function($name) {return $this->$name;	};

			$reader = $propertyReader->bindTo($this->intermediateMapper, $this->intermediateMapper);

			foreach ($reader('relations') as $relation) {
				$propertyReader = $propertyReader->bindTo($relation, $relation);
				if ($propertyReader('parentField') != $this->parentField) {
					$relation = $relation->getData($this->object);
					$this->otherInfo = [$propertyReader('localField'),  $propertyReader('parentField'), $propertyReader('mapper')];
				}
			}
		}
		return $this->otherInfo;
	}
402713
public function returnButton($details = [])
    {
        if (! empty($details['returnTo']))
        {
            $details['windowOpen'] = ['route' => $details['returnTo']];
            unset($details['returnTo']);
        }
        return $this->generateButton($this->buttons['return'], $details);
    }
972991
protected function filterDocMDLayoutTable($default, $details)
    {
        $md = [];
        /** @var $data */
        /** @var $definition */
        /** @var $source */
        extract($details);

        $md[] = "| Method & Endpoint | Parameters | Description |";
        $md[] = "|-------------------|------------|-------------|";
        $groups = $data['groups'];
        foreach ($groups as $groupName => $group) {
            $items = $group['items'];
            foreach ($items as $apiName => $item) {
                /** @var $method string the function name */
                /** @var $endpoint */
                /** @var $parameters */
                /** @var $defaults */
                /** @var $description */
                extract($item);

                $parameters = array_map(function ($item) {
                    return "`{$item}`";
                }, $parameters);

                if (!empty($defaults)) {
                    foreach ($parameters as $index => &$param) {
                        $defaultParam = str_replace('`', '', $param);
                        if (isset($defaults[$defaultParam])) {
                            $param = "{$param} \[default: `{$defaults[$defaultParam]}`\]";
                        }
                    }
                }

                $method = "`{$method}`";

                $row = [];
                $row[] = implode('<br/>', [$method, $endpoint]);
                $params = implode("<br/>", $parameters) ?: '\[none\]';
                $row[] = $params;
                $row[] = $description;
                $row[] = '';

                $md[] = trim(implode(' | ', $row), ' ');
            }
        }

        return $md;
    }
857827
public function getButton($details)
    {
        if (is_string($details)) {
            return HtmlHelper::get()->noContentElement('input', array(
                'type' => 'submit',
                'name' => $details,
                'value' => $this->translate(ucwords(str_replace('_', ' ', $details)))
            ));
        }
        if (isset($details['visible']) && $details['visible'] == false) {
            return ''; //return nothing if hidden;
        }
        $htmlOptions = isset($details['htmlOptions']) ? $details['htmlOptions'] : array();
        $htmlOptions['type'] = isset($details['type']) ? $details['type'] : 'submit';
        $htmlOptions['name'] = $details['name'];
        $htmlOptions['value'] = $this->translate($details['label']);
        return HtmlHelper::get()->noContentElement('input', $htmlOptions);
    }
855492
private function getRichFieldName(string $name): string
    {
        $this->initRichModelUtils();
        $exceptedName = \lcfirst($name);

        $field = $this->richAccessMapExists ? null : $exceptedName;

        if ($this->richAccessMapExists) {
            if (\array_key_exists($exceptedName, $this->richAccessMapArray)) {
                $field = $this->richAccessMapArray[$exceptedName];
            } elseif (!\array_key_exists(RichModelInterface::RICH_STRICT, $this->richAccessMapArray)) {
                $field = $exceptedName;
            }
        }

        if (!$field || !$this->richClassReflection->hasProperty($field)) {
            throw new RichModelFieldException(\sprintf('Field "%s" (remapped: %s) not found!', $name, $field));
        }

        return $field;
    }
402289
public function get_name() {
        $identifier = 'cachedef_'.clean_param($this->area, PARAM_STRINGID);
        $component = $this->component;
        if ($component === 'core') {
            $component = 'cache';
        }
        return new lang_string($identifier, $component);
    }
1180534
public function get_details($short = '') {
        global $DB, $OUTPUT;
        $output = array();
        foreach ($this->params as $p) {
            if (is_numeric($p['field'])) {
                $str = $DB->get_field('user_info_field', 'name', array('id' => $p['field']));
            } else {
                $str = get_user_field_name($p['field']);
            }
            if (!$str) {
                $output[] = $OUTPUT->error_text(get_string('error:nosuchfield', 'badges'));
            } else {
                $output[] = $str;
            }
        }

        if ($short) {
            return implode(', ', $output);
        } else {
            return html_writer::alist($output, array(), 'ul');
        }
    }
823750
public function get_details($short = '') {
        global $OUTPUT;
        $output = array();
        foreach ($this->params as $p) {
            $str = self::get_role_name($p['role']);
            if (!$str) {
                $output[] = $OUTPUT->error_text(get_string('error:nosuchrole', 'badges'));
            } else {
                $output[] = $str;
            }
        }

        if ($short) {
            return implode(', ', $output);
        } else {
            return html_writer::alist($output, array(), 'ul');
        }
    }
871642
public function isSameAddressPayPalUser($details)
    {
        $userData = array();
        $userData[] = \OxidEsales\Eshop\Core\Str::getStr()->html_entity_decode($this->oxuser__oxstreet->value);
        $userData[] = \OxidEsales\Eshop\Core\Str::getStr()->html_entity_decode($this->oxuser__oxstreetnr->value);
        $userData[] = \OxidEsales\Eshop\Core\Str::getStr()->html_entity_decode($this->oxuser__oxcity->value);

        $street = $this->splitShipToStreetPayPalUser($details->getShipToStreet());

        $compareData = array();
        $compareData[] = $street['street'];
        $compareData[] = $street['streetnr'];
        $compareData[] = $details->getShipToCity();

        return $userData == $compareData;
    }
464384
public function get_details($short = '') {
        global $DB, $OUTPUT;
        $output = array();
        foreach ($this->params as $p) {
            $cohortname = $DB->get_field('cohort', 'name', array('id' => $p['cohort']));
            if (!$cohortname) {
                $str = $OUTPUT->error_text(get_string('error:nosuchcohort', 'badges'));
            } else {
                $str = html_writer::tag('b', '"' . format_string($cohortname, true) . '"');
            }
            $output[] = $str;
        }

        if ($short) {
            return implode(', ', $output);
        } else {
            return html_writer::alist($output, array(), 'ul');
        }
    }