Sets the DataTypeParam for a given field

@param array $properties

@return $this
495012
public function setDataTypeParams(array $properties)
    {
        if (Helpers::isKeyExists($properties, 'data-type-params')) {
            $this->methodParams = $this->getDataTypeParams((array) $properties['data-type-params']);
        }
		
        return $this;
    }
1246900
public function setPropertyValues($property,$values){
		if(\is_array($values)===false){
			$values=\array_fill(0, $this->count(),$values);
		}
		foreach ($values as $i=>$value){
			if(isset($this->content[$i])){
				$this->content[$i]->setProperty($property,$value);
			}
			else{
				return $this;
			}
		}
		return $this;
	}
1358694
public function setMapping(array $fields = [])
    {
        $allowedFields = ['backend', 'page', 'navigation', 'date', 'forward', 'custom1', 'custom2', 'custom3', 'custom4', 'custom5'];
        foreach ($fields as $field => $value) {
            if (!$value || !in_array($field, $allowedFields)) {
                continue;
            }
            if ($field === 'date' && is_string($value)) {
                $value = new \DateTime($value);
            }
            $this->$field = $value;
        }

        return $this;
    }
503039
public function presetProperties(array &$properties)
    {
        $definitions = Config::getCommonDefinitions();
		
        foreach ($definitions as $definition) {
            $patterns = $this->getArrayByKey($definition, 'match');

            if (Helpers::strIs($patterns, $properties['name'])) {
                //auto add any config from the master config
                $settings = $this->getArrayByKey($definition, 'set');
				
                foreach ($settings as $key => $setting) {
					
                    if (!Helpers::isKeyExists($properties, $key) || empty($properties[$key])) {
                        $properties[$key] = $setting;
                    }
                }
            }
        }

        return $this;
    }
1045346
public function setProperties($properties)
  {
    if ( is_array($properties) || is_object($properties) ){
      foreach((array)$properties as $k => $v){
        $this->set($k, $v);
      }
      return true;
    }

    return false;
  }
1091748
public static function setPropertiesValues($object, array $propertiesValues)
    {
        /*
         * No properties?
         * Nothing to do
         */
        if (empty($propertiesValues)) {
            return;
        }

        foreach ($propertiesValues as $property => $value) {
            static::setPropertyValue($object, $property, $value);
        }
    }
864767
public function setPredefindProperties(array $properties)
    {
        foreach ($this->predefinedKeyMapping as $key => $property) {
            if (Helpers::isKeyExists($properties, $key)) {
                if (is_array($property)) {
                    foreach ($property as $name) {
                        $this->{$name} = $properties[$key];
                    }
                } else {
                    $this->{$property} = $properties[$key];
                }
            }
        }

        return $this;
    }
813610
public function setDataFromArray(array $values = array())
    {
        foreach ($values as $key => $value) {

            $desiredKey = $this->trimPrefixKey($key);

            $propertyName = $this->getPropertyName($desiredKey);
            $setterMethodName = 'set' . ucfirst($propertyName);

            // Direct setter exists into object, just use it
            if (method_exists($this, $setterMethodName) && $value !== null) {
                $this->$setterMethodName($value);
            } elseif ($value !== null) {
                // Otherwise, try to get sub object to set data
                $this->setDataForSubEntitiy($desiredKey, $value);
            }
        }
        return $this;
    }
1296175
public function setProperties($properties)
    {
        $obj = $this->excel->getProperties();
        foreach ($properties as $property_name => $value) {
            $method = "set$property_name";
            if (method_exists($obj, $method)) {
                $obj->{$method}($value);
            }
        }

        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;
    }
318595
public function setParams($params)
		{
			$this->params = [];
			foreach ($params as $param)
			{
				// variables
				$name = $param['name'];
				$type = $param['type'];
				$value = $param['value'];

				// properties
				$this->params[$name] = $this->convert($type, $value);
			}

			// return
			return $this;
		}
612895
protected function setPlaceholder(array $properties)
    {
        $labels = $this->getPlaceholderFromArray($properties);

        foreach ($labels as $label) {
            $this->addPlaceholder($label->text, $label->isPlain, $label->lang);
        }

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

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

        return $query;
    }
1229705
protected function setDataType(Field & $field, $type)
    {
        $map = $this->dataTypeMap();

        if (array_key_exists($type, $map)) {
            $field->dataType = $map[$type];
        }

        return $this;
    }
494208
protected function setProperties(array $properties = [])
    {
        foreach ($properties as $name => $value) {
            // set property
            if (property_exists($this, $name)) {
                $this->$name = $value;

            // unknown property found
            } else {
                trigger_error(
                    sprintf(
                        'unknown property "%s" for "%s"',
                        $name,
                        get_class($this)
                    ),
                    E_USER_WARNING
                );
            }
        }
    }
37127
public function Field($properties = array()) {
		Requirements::javascript(BOOTSTRAP_TAGFIELD_DIR.'/javascript/typeahead.js');
		Requirements::javascript(BOOTSTRAP_TAGFIELD_DIR.'/javascript/bootstrap-tagfield.js');
		Requirements::javascript(BOOTSTRAP_TAGFIELD_DIR.'/javascript/bootstrap-tagfield-init.js');
		Requirements::css(BOOTSTRAP_TAGFIELD_DIR.'/css/bootstrap-tagfield.css');

		$this->setAttribute('data-value', $this->getValuesJSON())
			 ->setAttribute('data-bootstrap-tags', true)
			 ->setAttribute('data-query-url', $this->Link('query'))
			 ->setAttribute('data-prefetch-url', $this->Link('prefetch'))
			 ->setAttribute('data-freeinput', $this->freeInput)
			 ->setAttribute('class', 'text');
		
		return $this->renderWith(
			$this->getTemplates()
		);
	}
956300
public function addFormProperties(array $properties)
    {
        foreach ($properties as $propertyIdent => $property) {
            $this->addFormProperty($propertyIdent, $property);
        }

        return $this;
    }