Set the menu item type.

@param  array  $properties

@return self
333314
private function setType(array &$properties)
    {
        $type = array_pull($properties, 'type', null);

        $this->type = is_null($type)
            ? $this->guessType($properties)
            : $type;

        return $this;
    }
768296
public function setItems($items)
    {
        foreach ($this->items as $item) {
            $item->setOrder(null);
        }
        foreach ($items as $item) {
            $item->setOrder($this);
        }
        $this->items = $items;
        return $this;
    }
908974
protected function setForeignRelationFromArray(array $properties)
    {
        if (Helpers::isKeyExists($properties, 'is-foreign-relation') && !$properties['is-foreign-relation']) {
            return $this;
        }

        $relation = ForeignRelationship::predict($this->name, Helpers::getModelsPath());

        if (Helpers::isKeyExists($properties, 'foreign-relation')) {
            $relation = ForeignRelationship::get((array) $properties['foreign-relation']);

            if (!is_null($relation)) {
                $this->setOnStore($properties);
                $this->setOnUpdate($properties);
            }

        } else if (Helpers::isKeyExists($properties, 'foreign-constraint')) {
            $constraint = $this->getForeignConstraintFromArray((array) $properties);

            if (!is_null($constraint)) {
                $relation = $constraint->getForeignRelation();
            }
        }

        $this->setForeignRelation($relation);

        return $this;
    }
1244726
public function setValues(array $values)
    {
        foreach ($values as $name => $value) {
            if ($element = $this->get($name)) {
                $element->setValue($value);
            }
        }
        return $this;
    }
985895
public function setStyle(array $css_properties=[]) :self {
		// init the style attribute is it didn't exist already
		isset($this->attributes['style']) ?: $this->attributes['style'] = '';
		// for each of the css properties
		foreach($css_properties as $css_property => $css_value) {
			// add them to the already existing ones
			$this->attributes['style'] .= $css_property.':'.$css_value.';';
		}
		// return self
		return($this);
	}
1176254
protected function setPlaceholder(&$properties)
    {
        if (!Helpers::isKeyExists($properties, 'placeholder')) {
            $properties['placeholder'] = $this->getPlaceholders($properties['name'], $this->getHtmlType($properties));
        }

        return $this;
    }
778478
public function setProperties(array $properties = [])
    {
        foreach ($properties as $property => $value) {
            $method = 'set'.ucfirst($property);
            if (!method_exists($this, $method)) {
                throw new \RuntimeException("Undefined method $method.");
            }

            if (!in_array($property, $this->validProperties)) {
                throw new \Exception('You are trying to set invalid properties. Please check valid properties.');
            }

            $this->{$method}($value);
        }
    }
1314150
public function setRequiredPropertyTypes(string $property, $types)
    {
        $this->required[$property] = $types;
        $this->requiredTypes[$property] = $types;

        return $this;
    }
203208
public function setOnUpdate(array $properties)
    {
        if (array_key_exists('on-update', $properties)) {
            $this->onUpdate = $this->getOnAction($properties['on-update']);
        }

        return $this;
    }
1183270
public function from($collection, $properties = null) {
		$this->_collection = $collection;
		
		if (is_string($properties) || is_array($properties)) {
			$this->_properties = (array) $properties;
		}
		
		return $this;
	}
19585
public function setProperties(array $properties)
    {
        foreach ($properties as $key => $value) {
            if (array_key_exists($key, $this->properties)) {
                $method = 'set' . ucfirst($key);
                $this->$method($value);
            } else {
                throw new Exception\InvalidArgumentException(__METHOD__ . " property '$key' is not supported in column.");
            }
        }

        return $this;
    }
355796
public function setSettings(array $settings = []) : self
    {
        $this->settings = array_merge($this->settings, $settings);
        // loop through checking each setting
        foreach ($this->allowedSettings as $name => $allowed) {
            $this->validateSettings->__invoke($name, $this->settings[$name], $allowed);
        }

        return $this;
    }
642015
public function addHiddenProperties(array $properties)
    {
        foreach ($properties as $propertyIdent => $property) {
            $this->addHiddenProperty($propertyIdent, $property);
        }

        return $this;
    }
497361
public function setItems($items)
    {
        $this->items = array();

        foreach ($items as $item) {
            $this->addItem($item);
        }

        return $this;
    }
473293
public function setProperties($properties, $modified = true)
    {
        if ($properties instanceof KModelEntityInterface) {
            $properties = $properties->getProperties(false);
        } else {
            $properties = (array) $properties;
        }

        foreach ($properties as $property => $value) {
            $this->setProperty($property, $value, $modified);
        }

        return $this;
    }
978130
private function setProperties(array $data)
    {
        foreach ($data as $key => $value) {
            $this->setProperty($key, $value);
        }

        return $this;
    }
597608
public function withProperties(array $properties): self
    {
        $query = $this;

        foreach ($properties as $property => $cypher) {
            $query = $query->withProperty($property, $cypher);
        }

        return $query;
    }