Add a parent attribute to all items in the menu.

@param string $attribute
@param string $value

@return $this
510698
public function setItemParentAttribute(string $attribute, string $value = '')
    {
        $this->applyToAll(function (HasParentAttributes $item) use ($attribute, $value) {
            $item->setParentAttribute($attribute, $value);
        });

        return $this;
    }
776719
public function addCustomField($attribute, $value)
    {
        if ($this->customFields === null) {
            $this->customFields = array();
        }
        $this->customFields[$attribute] = $value;
    }
1124316
public function setAttr($attr, $value) {
		$this->_attrs[$attr] = trim($value);
		$this->_tagCached    = null;
		
		return $this;
	}
184004
public function setAttribute($attr, $value) {

		$attr = strtolower($attr);

		switch($attr) {
			case 'action':
				$this->setAction($value);
				return $this;

			case 'enctype':
				$this->setEncType($value);
				return $this;

			case 'method':
				$this->setMethod($value);
				return $this;

			default:
				$this->attributes[$attr] = $value;
		}

		return $this;

	}
1255555
function addAttribute(Attribute $attribute)
    {
        $attribute->setRelation($this);
        $this->attributes[$attribute->getName()] = $attribute;
        return $this;
    }
229411
public function setAttribute($key, $value)
    {
        if ($value === null) {
            unset($this->attributes[$key]);
        } else {
            $this->attributes[$key] = $value;
        }

        return $this;
    }
102607
public function set_attribute($attr, $value = null)
	{
		$attr = is_array($attr) ? $attr : array($attr => $value);
		foreach ($attr as $key => $value)
		{
			if ($value === null)
			{
				unset($this->attributes[$key]);
			}
			else
			{
				$this->attributes[$key] = $value;
			}
		}

		return $this;
	}
622108
public function add($attribute, ...$values)
    {
        foreach ($values as $value) {
            if ($this->has($attribute)) {
                $attribute = $this->resolveAttributeName($attribute);
                $this->attributes[$attribute] = $this->addAttributeValue($this->attributes[$attribute], $value);
            } else {
                $this->attributes[$attribute] = $value;
            }
            $this->batches->add(new Batch(Batch::TYPE['ADD'], $attribute, $value));
        }

        return $this;
    }
1066892
public function attribute( string $attr, string $value ): Tag
    {
        $this->attributes[$attr] = $value;

        return $this;
    }
657013
public function setAttribute($attribute, $value)
    {
        array_set($this->cart->attributes, $attribute, $value);

        $this->update();
    }
1045060
public function filter($attribute, $value)
    {
        $filter = $attribute . ':' . (is_array($value) ? implode(',', $value) : $value);

        if ($this->offsetExists('filter')) {
            $filter = $this->offsetGet('filter') . ';' . $filter;
        }

        $this->offsetSet('filter', $filter);

        return $this;
    }
459551
public function setAttribute(string $attribute, $value = []): self
    {
        $this->attributes[$attribute] = $this->wrap($value);

        return $this;
    }
846743
public function setAttribute($attribute, $value = null)
    {
        if ($attribute === 'class') {
            $this->addClass($value);

            return $this;
        }

        $this->attributes[$attribute] = $value;

        return $this;
    }
68575
public function setAttr($attr, $value = null)
    {
        if (is_array($attr)) {
            $this->attr = array_merge($this->attr, $attr);

            return $this;
        }

        $this->attr[$attr] = $value;

        return $this;
    }
1002039
public function appendAttribute($attr, $value)
    {
        $this->setAttribute($attr, trim($this->getAttribute($attr) . $value));

        return $this;
    }
531529
public function setAttribute($name, $value)
    {
        if (empty($value)) {
            $this->node->removeAttribute($name);
        } else {
            $this->node->setAttribute($name, $value);
        }

        return $this;
    }
637020
public function setAttr(string $name, string $value)
    {
        $this->attr[$name] = $value;

        return $this;
    }