Model/Connector/Datafield.php
public function setDatafield(
        $name,
        $value,
        $type = 'string',
        $visibility = 'private'
    ) {
        $this->datafields[] = [
            'name' => $name,
            'value' => $value,
            'type' => $type,
            'visibility' => $visibility,
        ];

        return $this->datafields;
    }
public function setDatafield(
        $name,
        $value,
        $type = 'string',
        $visibility = 'private'
    ) {
        $this->datafields[] = [
            'name' => $name,
            'value' => $value,
            'type' => $type,
            'visibility' => $visibility,
        ];

        return $this->datafields;
    }
public function setDatafield ( $ name , $ value , $ type = 'string' , $ visibility = 'private' ) { $ this -> datafields [ ] = [ 'name' => $ name , 'value' => $ value , 'type' => $ type , 'visibility' => $ visibility , ] ; return $ this -> datafields ; }
Set a single datafield.

@param string $name
@param string|int|boolean $value
@param string $type
@param string $visibility

@return array
Set a single datafield .