public function createContentType(ContentTypeContainer $parent, $name, PageConfigurationSet $pcs, MetadataSet $ms, DataDefinition $dd = NULL) { if (trim($name) == "") { throw new e\CreationErrorException(S_SPAN . c\M::EMPTY_ASSET_FACTORY_NAME . E_SPAN); } $asset = AssetTemplate::getContentType(); $asset->contentType->name = $name; $asset->contentType->parentContainerPath = $parent->getPath(); $asset->contentType->siteName = $parent->getSiteName(); $asset->contentType->pageConfigurationSetPath = $pcs->getPath(); $asset->contentType->metadataSetPath = $ms->getPath(); if (isset($dd)) { $asset->contentType->dataDefinitionPath = $dd->getPath(); } return $this->createAsset($asset, ContentType::TYPE, $this->getPath($parent, $name), $parent->getSiteName()); }
public function setMetadataSet(MetadataSet $ms) { if ($ms == NULL) { throw new e\NullAssetException(c\M::NULL_ASSET); } $this->getProperty()->metadataSetId = $ms->getId(); $this->getProperty()->metadataSetPath = $ms->getPath(); $this->edit(); $this->processMetadata(); return $this; }
public function setMetadataSet(MetadataSet $ms) { $this->getProperty()->metadataSetId = $ms->getId(); $this->getProperty()->metadataSetPath = $ms->getPath(); return $this; }