src/Entities/FieldCollection.php
public function clear()
    {
        foreach ($this->items as $item) {
            $this->deleted[] = $item;
        }

        $this->items = [];
    }
public function clear()
    {
        foreach ($this->items as $item) {
            $this->deleted[] = $item;
        }

        $this->items = [];
    }
public function clear ( ) { foreach ( $ this -> items as $ item ) { $ this -> deleted [ ] = $ item ; } $ this -> items = [ ] ; }
Remove all items in this collection

@return void
Remove all items in this collection