Add page_contents

@param \Haven\CmsBundle\Entity\PageContent $pageContents
@return Page
775501
public function addHtmlContent(\Haven\CmsBundle\Entity\PageContent $pageContents) {

        $this->addPageContent($pageContents);

        return $this;
    }
1211676
public function removePageContent(\Haven\CmsBundle\Entity\PageContent $pageContents) {
        $this->page_contents->removeElement($pageContents);
    }
806561
public function addContents($contents)
    {
        if (current($contents) instanceof Content) {
            foreach ($contents as $content) {
                $this->addContent($content);
            }
        } else {
            foreach ($contents as $key => $value) {
                $this->addContent($key, $value);
            }
        }
    }
1040115
private function createCache($renderedContent)
    {
        if (!CmsComponent::isCmsLoggedIn()) {
            Cache::getInstance()->setCacheForPath(Request::$requestUri, $renderedContent, json_encode(ResponseHeaders::getHeaders()));
        }
    }
60180
public function addBusCardContent(\Haven\CmsBundle\Entity\PageContent $pageContents) {

        $this->addPageContent($pageContents);

        return $this;
    }
735529
public function getPageContent($pageId)
    {
        // Retrieve cache version if front mode to avoid multiple calls
        $melisEngineCacheSystem = $this->getServiceLocator()->get('MelisEngineCacheSystem');
        $pageContent = $melisEngineCacheSystem->getCacheByKey($this->cachekey.$pageId, $this->cacheConfig, true);
        
        return $pageContent;
    }
300663
public function CreateContentAreas($arrayOfContentAreas)
    {
        $postC = new ET_ContentArea();
        $postC->authStub = $this;
        $postC->props = $arrayOfContentAreas;
        $sendResponse = $postC->post();
        return $sendResponse;
    }
693290
public function addContent($content)
    {
        if ($content instanceof Page) {
            $this->addPage($content);
        }
        else {
            if ($content) {
                $this->addChild($content);
            }
            else {
                throw new Exception("Unknown content type.");
            }
        }
    }
528212
public function addPage(\CampaignChain\Location\FacebookBundle\Entity\Page $pages)
    {
        $this->pages[] = $pages;

        return $this;
    }
1331393
public function setPage(\Haven\CmsBundle\Entity\Page $page = null) {
        $this->page = $page;

        return $this;
    }
94709
public static function addAdminMenuItem($menuContent)
    {
        $menuPath = resource_path('views/admin/menu.blade.php');
        $menus = file_get_contents($menuPath);
        if (!str_contains($menus, $menuContent)) {
            file_put_contents($menuPath, $menus . "\n" . $menuContent . "\n");
        }
    }
496957
public function setContent(ChildContent $v = null)
    {
        if ($v === null) {
            $this->setContentId(NULL);
        } else {
            $this->setContentId($v->getId());
        }

        $this->aContent = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildContent object, it will not be re-added.
        if ($v !== null) {
            $v->addDealerContent($this);
        }


        return $this;
    }
1144057
protected function createContent()
    {
        $this->setCliMessage('Creating content...');

        $this->initConfig();
        $this->createDbConfig();
        $this->createStore();
        $this->createSuperadmin();
        $this->createCountries();
        $this->createLanguages();
        $this->createPages();
    }
253907
public function appendPageContent(string $str): PdfInterface
    {
        $this->setProperty('pageContent', $str);
        $this->mpdf->WriteHTML($this->pageContent);

        return $this;
    }
1082886
public function updateContent($content)
    {
        $db = Eresus_CMS::getLegacyKernel()->db;
        $item = $db->selectItem('pages', "`id`='".Eresus_Kernel::app()->getPage()->id."'");
        $item['content'] = $content;
        $db->updateItem('pages', $item, "`id`='".Eresus_Kernel::app()->getPage()->id."'");
    }
1076480
public function setPageContent()
	{
		$content = "---\n";
		$content .= "type: ". $this->properties['type'] . "\n";
		$content .= "layout: " . $this->properties['layout'] . "\n";
		$content .= "title: " . $this->properties['title'] . "\n";
		$content .= "---\n";
		$content .= $this->properties['body'];

		return $content;
	}
76139
public function addContent($campaignId, $contentData = [], $params = [])
    {
        $endpoint = $this->endpoint . '/' . $campaignId . '/content';

        $response = $this->restClient->put($endpoint, $contentData);

        return $response['body'];
    }