public function commit(AbstractClassContent $content, array $data = [])
    {
        foreach ($this->getAllClassContentClassnames() as $classname) {
            class_exists($classname);
        }

        if (null === $draft = $this->getDraft($content)) {
            throw new InvalidArgumentException(sprintf(
                '%s with identifier "%s" has not draft, nothing to commit.',
                $content->getContentType(),
                $content->getUid()
            ));
        }

        if (isset($data['parameters']) || isset($data['elements'])) {
            $cleanDraft = clone $draft;
            $this->prepareDraftForCommit($content, $draft, $data);
            $this->executeCommit($content, $draft);
            $this->commitPostProcess($content, $cleanDraft);
        } else {
            $this->executeCommit($content, $draft);
        }

        return $this;
    }
public function commit(AbstractClassContent $content, array $data = [])
    {
        foreach ($this->getAllClassContentClassnames() as $classname) {
            class_exists($classname);
        }

        if (null === $draft = $this->getDraft($content)) {
            throw new InvalidArgumentException(sprintf(
                '%s with identifier "%s" has not draft, nothing to commit.',
                $content->getContentType(),
                $content->getUid()
            ));
        }

        if (isset($data['parameters']) || isset($data['elements'])) {
            $cleanDraft = clone $draft;
            $this->prepareDraftForCommit($content, $draft, $data);
            $this->executeCommit($content, $draft);
            $this->commitPostProcess($content, $cleanDraft);
        } else {
            $this->executeCommit($content, $draft);
        }

        return $this;
    }
public function commit ( AbstractClassContent $ content , array $ data = [ ] ) { foreach ( $ this -> getAllClassContentClassnames ( ) as $ classname ) { class_exists ( $ classname ) ; } if ( null === $ draft = $ this -> getDraft ( $ content ) ) { throw new InvalidArgumentException ( sprintf ( '%s with identifier "%s" has not draft, nothing to commit.' , $ content -> getContentType ( ) , $ content -> getUid ( ) ) ) ; } if ( isset ( $ data [ 'parameters' ] ) || isset ( $ data [ 'elements' ] ) ) { $ cleanDraft = clone $ draft ; $ this -> prepareDraftForCommit ( $ content , $ draft , $ data ) ; $ this -> executeCommit ( $ content , $ draft ) ; $ this -> commitPostProcess ( $ content , $ cleanDraft ) ; } else { $ this -> executeCommit ( $ content , $ draft ) ; } return $ this ; }
Computes provided data to define what to commit from given content.

@param  AbstractClassContent $content
@param  array                $data

@return ClassContentManager
Computes provided data to define what to commit from given content .