Devise\Pages\Fields\LiveFieldValue::override PHP Method

override() public method

Overrides this data with the new input array
public override ( array $input ) : void
$input array
return void
    public function override(array $input)
    {
        $this->unextract();
        $this->__->values = $input;
        $this->__->json = json_encode($this->__->values);
        $this->extract();
    }

Usage Example

Example #1
0
 public function test_it_can_overrides()
 {
     $obj = new LiveFieldValue('{"zero": ""}', 12, 'field');
     $obj->override(['one' => 'two', 'buckle' => 'my shoe']);
     assertEquals('{"one":"two","buckle":"my shoe"}', $obj->toJSON());
 }