Fetches a style by its id from the list of styles.

@param {String} id The id of the style to fetch
@return {Object} The style description object
549740
function fetchStyle(id) {
    for (var i = 0; i < styles.length; i++)
      if (styles[i].id === id) return styles[i];
  }
611955
def _get_style_id_from_style(self, style, style_type):
        
        if style.type != style_type:
            raise ValueError(
                "assigned style is type %s, need type %s" %
                (style.type, style_type)
            )
        if style == self.default(style_type):
            return None
        return style.style_id
257207
function _getBarById(id) {
			return _rawdata.reduce(function (result, item) {
				if (item.uid === id) {
					result = item;
				}

				return result;
			}, null);
		}
824482
def find_by_id(cls, id):
        
        obj = cls.find_one(cls._id_spec(id))
        if not obj:
            raise NotFoundException(cls.collection, id)
        return obj
646607
def get(self, id):
        
        data = self.fetch('documents/%s.json' % id).get("document")
        data['_connection'] = self._connection
        return Document(data)
54598
public static function getId($id) {
    $id = str_replace([' ', '_', '[', ']'], ['-', '-', '-', ''], Unicode::strtolower($id));

    // As defined in http://www.w3.org/TR/html4/types.html#type-name, HTML IDs can
    // only contain letters, digits ([0-9]), hyphens ("-"), underscores ("_"),
    // colons (":"), and periods ("."). We strip out any character not in that
    // list. Note that the CSS spec doesn't allow colons or periods in identifiers
    // (http://www.w3.org/TR/CSS21/syndata.html#characters), so we strip those two
    // characters as well.
    $id = preg_replace('/[^A-Za-z0-9\-_]/', '', $id);

    // Removing multiple consecutive hyphens.
    $id = preg_replace('/\-+/', '-', $id);
    return $id;
  }
1343515
function $tag(tag, id, css) {
		var element = document.createElement(tag);

		if (id) {
			element.id = prefix + id;
		}

		if (css) {
			element.style.cssText = css;
		}

		return $(element);
    }
587593
function fetchView( data, id ) {

	data.backgroundColor = randomCol();
	data.fontColour		 = data.backgroundImage? '' : getContrastYIQ( data.backgroundColor );

	let wrapper 		= document.createElement('div');
	wrapper.className 	= 'section hidden';
	wrapper.innerHTML 	= SimpleViewTemplate( data );
	wrapper.dataset.id  = id;

	container.appendChild( wrapper );
	return wrapper;
}
1121948
function getElementById(id) {
		var el = null;
		try {
			el = doc.getElementById(id);
		}
		catch (e) {}
		return el;
	}
46999
function style(title, id)
  {
    if(!__templates[title]) return console.error("ERR: Component "+title+" does not exist, make sure to create it", new Error().stack);
    
    var styleTemplates = __styles[title],
        mainStyle = (document.head.querySelector('style[component="'+ title +'"]') || createStyleNode(title, styleTemplates[0])),
        localStyle = createStyleNode(title, styleTemplates[1], id);
    
    return [mainStyle, localStyle];
  }
694700
public int getStyle(int styleId, int theme){
        int[] styles = getStyleList(styleId);
        return styles == null ? 0 : styles[theme];
    }
1156150
function getStyleSheet(id, createIfNotExists){
    if (!id)
      id = 'DefaultGenericStyleSheet';

    if (!cssStyleSheets[id])
      if (createIfNotExists)
        cssStyleSheets[id] = new StyleSheet(addStyleSheet());

    return cssStyleSheets[id];
  }
1281388
public CmsListItem getItem(String id) {

        Iterator<CmsListItem> it = getAllContent().iterator();
        while (it.hasNext()) {
            CmsListItem item = it.next();
            if (item.getId().equals(id)) {
                return item;
            }
        }
        return null;
    }
883758
public C get(String id){
		C container = this.containerMap.get(id);

		if(container != null && (container.getState()).equals(State.REMOVED)){
			return null;
		}

		return container;
	}
539923
public static HtmlTree A_ID(HtmlStyle styleClass, String id, Content body) {
        HtmlTree htmltree = A_ID(id, body);
        if (styleClass != null)
            htmltree.addStyle(styleClass);
        return htmltree;
    }
38497
@Help(help = "Find the object of type {#} through the id")
  public T findById(final String id) throws SDKException {
    return (T) requestGet(id, clazz);
  }
236256
function stringifyStyle(style) {
  if (typeof style === 'string') {
    return style;
  }
  var values = [];
  for (var key in style) {
    values.push(key + ':' + style[key]);
  }
  return values.join(';');
}