private function updateContentSetElements(ContentSet $content, array $elementsData, Page $page = null)
    {
        $content->clear();
        foreach ($elementsData as $data) {
            if ($data instanceof AbstractClassContent) {
                if (null !== $page && null === $data->getMainNode()) {
                    $data->setMainNode($page);
                }
                $content->push($data);
            }
        }

        return $this;
    }
private function updateContentSetElements(ContentSet $content, array $elementsData, Page $page = null)
    {
        $content->clear();
        foreach ($elementsData as $data) {
            if ($data instanceof AbstractClassContent) {
                if (null !== $page && null === $data->getMainNode()) {
                    $data->setMainNode($page);
                }
                $content->push($data);
            }
        }

        return $this;
    }
private function updateContentSetElements ( ContentSet $ content , array $ elementsData , Page $ page = null ) { $ content -> clear ( ) ; foreach ( $ elementsData as $ data ) { if ( $ data instanceof AbstractClassContent ) { if ( null !== $ page && null === $ data -> getMainNode ( ) ) { $ data -> setMainNode ( $ page ) ; } $ content -> push ( $ data ) ; } } return $ this ; }
Updates provided contentset's elements with data.

@param  ContentSet $content
@param  array      $elementsData

@return ClassContentManager
Updates provided contentset s elements with data .