Get local related name.

@param boolean $code
@return string
169877
public function getLocalM2MRelatedName($code = true)
    {
        return $this->getReferencedTable()->getManyToManyRelatedName($this->getReferencedTable()->getRawTableName(), implode('_', $this->getLocalColumns()), $code);
    }
1013772
public static function getHierarchyNextChild($code)
    {
        $hierarchyField = static::getHierarchyField();
        $child_length = static::getHierarchyChildLength($code);
        if ($child_length < 0) {
            return false;
        }

        $max = static::query()->whereStartsWith($hierarchyField, $code, $child_length)->max($hierarchyField);
        if ($max === null) {
            return $code . str_pad('', $child_length - strlen($code) - 1, '0') . '1';
        } else {
            return static::_calcHierarchyNextChild($max);
        }
    }
125944
public function getAuthorizationCode($code)
    {
        if (!isset($this->authorizationCodes[$code])) {
            return false;
        }

        return array_merge(array(
            'authorization_code' => $code,
        ), $this->authorizationCodes[$code]);
    }
1289791
public function findUserByPersistenceCode($code)
    {
        $persistence = $this->findByPersistenceCode($code);

        if ($persistence)
        {
            return $persistence->getUser();
        }

        return false;
    }
831232
public function locale($code, $locale = null)
    {
        $name = Intl::getLocaleBundle()->getLocaleName($code, $locale ?: $this->localeDetector->getLocale());

        return $name ? $this->fixCharset($name) : '';
    }
841416
protected function UserGetGroupIdByCode($code)
    {
        $rsGroups = CGroup::GetList(($by = 'c_sort'), ($order = 'desc'), [
            'STRING_ID' => $code,
        ]);
        if ($ob = $rsGroups->Fetch()) {
            return $ob['ID'];
        } else {
            return null;
        }
    }
1019152
protected function _tag($code)
    {
        if( $this->tag === true )
        {
            $style = Singleton::class('ZN\Hypertext\Style');

            return $style->open().$code.$style->close();
        }

        return $code;
    }
53499
public function confirm($code = '')
    {
        if (!$this->confirmationAttribute || !$this->validateConfirmationCode($code)) {
            return false;
        }
        $this->confirmation = static::$confirmTrue;
        return $this->save();
    }
984391
protected function getTokenUrl($code) {
		return $this->providerOptions['access_token'] . '?client_id=' . $this->client_id . '&client_secret=' . $this->client_secret . '&code=' . $code . '&redirect_uri=' . urlencode($this->getState('redirect_uri'));
	}
1212032
public function getCity($code): string
    {
        $provinceCode = substr($code, 0, 2) . '0000';
        $cityCode = substr($code, 0, 4) . '00';
        if ($provinceCode != $cityCode) {
            return $this->get($cityCode);
        }

        return '';
    }
1318969
public function getDefaultName($code)
    {
        if (!array_key_exists($code, $this->defaultNameMapping)) {
            throw new LanguageNotFoundException(sprintf('Default language name for code "%s" not found.', $code));
        }

        return $this->defaultNameMapping[$code];
    }
943173
public static function getHierarchyParent($code)
    {
        $parent_length = static::getHierarchyParentLength($code);
        if ($parent_length < 0) {
            return false;
        }

        return substr($code, 0, $parent_length);
    }
323176
public function getAuthorizationCode($code)
    {
        $code = $this->getObjectByType('code_table',$code);

        return is_null($code) ? false : $code;
    }
706350
public function getFieldByCode($code)
    {
        foreach ($this->_fields as $field) {
            if ($field instanceof FieldInterface) {
                if ($field->getCode() == $code) {
                    return $field;
                }
            }
        }

        return null;
    }
53240
public static function guess(string $code) : string
    {
        switch (strtolower(trim($code))) {
            case SportMapperInterface::RUNNING:
            case 'run':
                return SportMapperInterface::RUNNING;
            case SportMapperInterface::CYCLING_SPORT:
            case 'cycling':
                return SportMapperInterface::CYCLING_SPORT;
            case SportMapperInterface::CYCLING_TRANSPORT:
                return SportMapperInterface::CYCLING_TRANSPORT;
            case SportMapperInterface::SWIMMING:
                return SportMapperInterface::SWIMMING;
            default:
                return SportMapperInterface::OTHER;
        }
    }
859297
public function getSubfieldsWithCode ($code)
    {
        return array_filter($this->_subfields, function (Subfield $s) use ($code) { return $s->getCode() == $code; });
    }
1320990
public static function get(int $code): string {

        if ( array_key_exists($code, self::ZIP_STATUS_CODES) ) return self::ZIP_STATUS_CODES[$code];

        else return sprintf('Unknown status %s', $code);

    }