public function createTextBlock(Folder $parent, $name, $text) { if (trim($name) == "") { throw new e\CreationErrorException(S_SPAN . c\M::EMPTY_BLOCK_NAME . E_SPAN); } if (trim($text) == "") { throw new e\CreationErrorException(S_SPAN . c\M::EMPTY_TEXT . E_SPAN); } $asset = AssetTemplate::getTextBlock(); $asset->textBlock->name = $name; $asset->textBlock->parentFolderPath = $parent->getPath(); $asset->textBlock->siteName = $parent->getSiteName(); $asset->textBlock->text = $text; return $this->createAsset($asset, TextBlock::TYPE, $this->getPath($parent, $name), $parent->getSiteName()); }