public function setRevisions(array $revisions)
    {
        $this->revisions = new ArrayCollection();

        /** @var \Rcm\Entity\Revision $revision */
        foreach ($revisions as $revision) {
            if (!$revision instanceof Revision) {
                throw new InvalidArgumentException(
                    "Invalid Revision passed in.  Unable to set array"
                );
            }

            $this->revisions->set($revision->getRevisionId(), $revision);
        }
    }
public function setRevisions(array $revisions)
    {
        $this->revisions = new ArrayCollection();

        /** @var \Rcm\Entity\Revision $revision */
        foreach ($revisions as $revision) {
            if (!$revision instanceof Revision) {
                throw new InvalidArgumentException(
                    "Invalid Revision passed in.  Unable to set array"
                );
            }

            $this->revisions->set($revision->getRevisionId(), $revision);
        }
    }
public function setRevisions ( array $ revisions ) { $ this -> revisions = new ArrayCollection ( ) ; /** @var \Rcm\Entity\Revision $revision */ foreach ( $ revisions as $ revision ) { if ( ! $ revision instanceof Revision ) { throw new InvalidArgumentException ( "Invalid Revision passed in.  Unable to set array" ) ; } $ this -> revisions -> set ( $ revision -> getRevisionId ( ) , $ revision ) ; } }
Overwrite revisions and Set a group of revisions

@param array $revisions Array of Revisions to be added

@throws InvalidArgumentException
Overwrite revisions and Set a group of revisions