Adds 'onUpdate' eloquent method to a given properties.

@param string $properties
@param CrestApps\CodeGenerator\Models\ForeignConstraint $constraint

@return $this
193723
protected function addOnUpdateConstraint(&$properties, ForeignConstraint $constraint)
    {
        if ($constraint->hasUpdateAction()) {
            $properties .= $this->getPropertyBaseSpace(18, true) . sprintf("->onUpdate('%s')", $constraint->onUpdate);
        }

        return $this;
    }
987654
public function insert(array $values, array $update=[], array $constraint=[]) {
		$sql = $this->buildInsertSQL([$values], $update, $constraint);
		$params = $this->getParameters();
		$this->db->query($sql, $params);
		return $this;
	}
671386
protected function preUpdate(array $properties = null)
    {
        $this->verifyDates();
        $this->setSlug($this->generateSlug());

        return parent::preUpdate($properties);
    }
891926
public function addConstraints()
    {
        if (static::$constraints) {
            $this->query->where($this->foreignKey, '=', $this->getParentKey());

            $this->query->whereNotNull($this->foreignKey);
        }
    }
847584
public FessMessages addConstraintsFutureMessage(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(CONSTRAINTS_Future_MESSAGE));
        return this;
    }
1167949
public function setConstraint($fieldName, $constraint)
    {
        $class = get_class($constraint);
        // remove existing constraint if it already exists
        if ($this->getConstraint($fieldName, $class)) {
            $this->removeConstraint($fieldName, $class);
        }

        $this->constraints[$fieldName][$class] = $constraint;

        if ($this->form) {
            $dataField = $this->form->Fields()->dataFieldByName($fieldName);
            $constraint->setField($dataField);
            if ($this->parsleyEnabled) {
                // If there is no field, output a clear error message before trying to apply parsley
                if (!$dataField) {
                    throw new Exception("You have set a constraint on '$fieldName' but it does not exist in the FieldList.");
                }
                $constraint->applyParsley();
            }
        }

        return $this;
    }
202600
public void add(String propertyName, Constraint[] valueConstraints) {
		add(new PropertyValueConstraint(propertyName, all(valueConstraints)));
	}
318344
public FessMessages addConstraintsRequiredMessage(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(CONSTRAINTS_Required_MESSAGE));
        return this;
    }
541594
public function selfUpdate(array $properties)
  {
    $this->execute("clientupdate", $properties);

    foreach($properties as $ident => $value)
    {
      $this->whoamiSet($ident, $value);
    }
  }
1127442
protected function addOnDeleteConstraint(&$properties, ForeignConstraint $constraint)
    {
        if ($constraint->hasDeleteAction()) {
            $properties .= $this->getPropertyBaseSpace(18, true) . sprintf("->onDelete('%s')", $constraint->onDelete);
        }

        return $this;
    }
1186813
public function addValueConstraint($fieldType, $value, $constraint)
    {
        $validatorName = $this->getFieldValidator($fieldType);
        $validatorParent = $validatorName . 'Validator';
        if ($this->fieldConstructionObject['fieldType']->validatorConfiguration == null) {
            $this->fieldConstructionObject['fieldType']->validatorConfiguration = array(
                $validatorParent => array(),
            );
        }
        $value = is_numeric($value) ? $value + 0 : $value;

        $this->fieldConstructionObject['fieldType']
            ->validatorConfiguration[$validatorParent][$constraint . $validatorName] = $value;
    }
380184
public function addConstraints()
    {
        if (static::$constraints) {
            $table = $this->related->getTable();

            $this->query->where($table.'.'.$this->otherKey, '=', $this->parent->{$this->foreignKey});
        }
    }
1059069
public function matching($constraint)
    {
        $this->constraint = $constraint;
        $this->queryBuilder->where($constraint);
        return $this;
    }
217458
public function createConstraint(Constraint $constraint, $table)
    {
        $this->_execSql($this->_platform->getCreateConstraintSQL($constraint, $table));
    }
1367206
public FessMessages addConstraintsNotEmptyMessage(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(CONSTRAINTS_NotEmpty_MESSAGE));
        return this;
    }
232544
public function constraint($key, IConstraint $constraint) {
        $this->validator->addConstraint($key, $constraint);

        return $this;
    }
1199237
protected function replaceConstraint()
    {
        $this->stub = \str_replace('DummyConstraint', \rtrim($this->options['constraint'], '()'), $this->stub);

        return $this;
    }