/** * Add a subcomponent * * @param object SiteComponent $siteComponent * @return void * @access public * @since 3/31/06 */ public function addSubcomponent(BlockSiteComponent $siteComponent) { $cell = $this->_element->ownerDocument->createElement('cell'); $snippet = $this->_element->ownerDocument->createElement($siteComponent->getComponentClass()); $snippet->setAttribute('id', $siteComponent->getId()); $cell->appendChild($snippet); $this->_element->appendChild($cell); // this is only for single page load deletes (testing) $this->_getChildComponents(true); $this->_saveXml(); if (!$this->isOrganizer($siteComponent->_asset->getAssetType())) { $this->_asset->addAsset($siteComponent->_asset->getId()); } }