Get a label related to a given board
@link https://trello.com/docs/api/board/#get-1-boards-board-id-labels-idlabel

@param string $id    the board's id
@param string $color the label's color

@return array
481964
public function show($id, $color)
    {
        $colors = array('blue', 'green', 'orange', 'purple', 'red', 'yellow');

        if (!in_array($color, $colors)) {
            throw new InvalidArgumentException(sprintf(
                'The "color" parameter must be one of "%s".',
                implode(", ", $colors)
            ));
        }

        return $this->get($this->getPath($id).'/'.rawurlencode($color));
    }
936223
protected function addLabelAttributes(array $attributes, $id)
    {
        $attributes = $this->addAttribute($attributes, 'for', $id);
        if (empty($id)) {
            $attributes = $this->addAttribute($attributes, 'class', $this->multiLabelClass);
        }
        return $attributes;
    }
1095248
private function formatLabel($label, $id = NULL, $attrs = array())
    {
        if($id)
            $attrs['for'] = $id;
        $ret = self::tag('label', $label, NULL, NULL, $attrs);
        return $ret;
    }
1273171
public function getParameterByID($id)
    {
        $param = current(array_filter($this->params, function (Param $param) use ($id) {
            return ($param->id === $id);
        }));

        return ($param) ? $param : null;
    }
1151119
public function getNodeData($id)
    {
        if (!isset($this->getMenu()[$id])) {
            return false;
        }
        
        return $this->getMenu()[$id];
    }
1129473
static public function getIdParents($id = null)
    {
        $id = ($id) ? $id : self::getIdActiveMenu();
        
        $idParent = self::getMapIdParent();
        
        if (!is_array( $id ))
        {
            if (isset( $idParent[ $id ] ))
            {
                $id = array($id);
            }
            else
            {
                return array();
            }
        }
        
        if (isset( $idParent[ end( $id ) ] ))
        {
            if (isset($idParent[ $idParent[ end( $id ) ] ]))
            {
                $id[] = $idParent[ end( $id ) ];
                return self::getIdParents($id);
            }
        }        
        
        return array_reverse( $id );       
    }
65537
protected static function getMixedColorAsRgb($color)
	{
		if (is_array($color)) {
			if (!static::validateRgbColor($color)) return false;
			return $color;
		} else {
			return static::hexToRgb($color);
		}
	}
407594
public static function getTitleById($table, $id) {

        //return "table = ".$table." and id = ".$id;

        // Special handling for users
        if ($table == "users") {
            return self::getUserForIndexListing($id);
        }

        // Special handling for posts (for post updates listing)
        if ($table == "posts") {
            return self::getPostForIndexListing($id);
        }

        $title = DB::table($table)->where('id', '=', $id)->pluck('title');

        if ($title == "") {
            return '<span class="text-danger">n/a</span>';
        }

        // ASSIGN COLOURS TO lookup_todo_priority_types
        if ($table == "lookup_todo_priority_types") {

            if (strtolower($title) == "green") {
                return '<button type="button" class="btn btn-success btn-sm">'.$title.'</button>';
            }

            if (strtolower($title) == "yellow") {
                return '<button type="button" class="btn btn-warning btn-sm">'.$title.'</button>';
            }

            if (strtolower($title) == "red") {
                return '<button type="button" class="btn btn-danger btn-sm">'.$title.'</button>';
            }

        }

        return $title;
    }
915027
public static function getById($id)
    {
        $result = null;
        $info = CldrData::getLanguageInfo($id);
        if (isset($info)) {
            $result = new Language($info);
        }

        return $result;
    }
188351
public function get($id)
    {
        foreach ($this->instructions as $instruction) {
            if (!$instruction instanceof Node && !$instruction instanceof Subgraph) {
                continue;
            }

            if ($instruction->getId() == $id) {
                return $instruction;
            }
        }

        throw new \InvalidArgumentException(sprintf('Found no node or graph with id "%s" in "%s".', $id, $this->id));
    }
816688
public static function getLabelsFromTable(string $tableName, string $idColumnName, string $labelColumnName): array
  {
    $query = "
select `%s`  id
,      `%s`  label
from   `%s`
where   nullif(`%s`,'') is not null";

    $query = sprintf($query, $idColumnName, $labelColumnName, $tableName, $labelColumnName);

    return self::executeRows($query);
  }
432871
public static function rgb(Color $color)
    {
        return sprintf(
            'rgb(%d, %d, %d)',
            $color->getRgb()['r'],
            $color->getRgb()['g'],
            $color->getRgb()['b']
        );
    }
1124850
public function getById($id)
    {
        $list = $this->getByCriteria($id, $this->getUniqueId());
        return reset($list);
    }
139450
public function get($id)
    {
        $data = $this->execute(
            self::HTTP_GET,
            self::DOMUSERP_API_OPERACIONAL . '/marcas/' . $this->brandId . '/modelos/' . $id
        );

        return $data;
    }
83254
public function label($label, $id = null, array $attributes = array())
	{
		if (is_array($label))
		{
			$attributes = $label;
			$label = $attributes['label'];
			isset($attributes['id']) and $id = $attributes['id'];
		}

		if (empty($attributes['for']) and $this->get_config('auto_id', false) == true)
		{
			empty($id) or $attributes['for'] = $this->get_config('auto_id_prefix', 'form_').$id;
		}

		unset($attributes['label']);

		return html_tag('label', $attributes, \Lang::get($label, array(), false) ?: $label);
	}
699802
public function cssClass($id) {
        $id=($id==='')?"0":$id;
        if (!isset($this->items[$id])) return "";
        if (@$this->items[$id]->countError()) {
            return "danger";
        }
        if ($this->items[$id]->countWarning()) {
            return "warning";
        }
        if ($this->items[$id]->countInfo()) {
            return "info";
        }
        if ($this->items[$id]->countSuccess()) {
            return "success";
        }
        return "";
    }
661960
public function getWithChartType($id)
    {
        $query = $this->createQueryBuilder('c')
            ->join('c.libs', 'lib')
            ->addSelect('lib')
            ->join('lib.type', 'type')
            ->addSelect('type')
            ->where('c.id = :idChart')
            ->setParameter('idChart', $id);

        return $query->getQuery()->getOneOrNullResult();
    }