/** * @param \Cms\Data\TemplateSnippet $data */ protected function setValuesFromData(TemplateSnippetData $data) { $this->setWebsiteId($data->getWebsiteId()); $this->setId($data->getId()); $this->setName($data->getName()); $this->setDescription($data->getDescription()); $this->setCategory($data->getCategory()); $this->setContent($data->getContent()); $this->setReadonly($data->isReadonly()); $this->setSourceType($data->getSourceType()); $this->setOverwritten($data->isOverwritten()); $this->setBaseLayout($data->isBaseLayout()); $this->setPageTypes($data->getPageTypes()); $this->setPreviewImageUrl($data->getPreviewImageUrl()); }
/** * set the TemplateSnippet attributes (if they are exists in the attributes array) * * @param \Orm\Entity\TemplateSnippet $snippetOrm * @param \Cms\Data\TemplateSnippet $snippet */ protected function setAttributesToOrm(OrmTemplateSnippet $snippetOrm, DataTemplateSnippet $snippet) { $snippetOrm->setName($snippet->getName()); $snippetOrm->setDescription($snippet->getDescription()); $snippetOrm->setCategory($snippet->getCategory()); $snippetOrm->setContent($snippet->getContent()); }