Example #1
0
 /**
  * encodeContentUrl encodes content link
  *
  * @param oxContent $oCont category object
  * @param int       $iLang language
  *
  * @return string|bool
  */
 public function getContentUrl($oCont, $iLang = null)
 {
     if (!isset($iLang)) {
         $iLang = $oCont->getLanguage();
     }
     return $this->_getFullUrl($this->getContentUri($oCont, $iLang), $iLang);
 }
Example #2
0
 /**
  * getParsedContent() test case
  * test returned parsed content with smarty tags when template regeneration is disabled
  * and template is saved twice.
  *
  * @return null
  */
 public function testGetParsedContentTagsWhenTemplateAlreadyGeneratedAndRegenerationDisabled()
 {
     $this->getConfig()->setConfigParam('blCheckTemplates', false);
     $this->_oObj->oxcontents__oxcontent = new oxField("[{* *}]generated", oxField::T_RAW);
     $this->_oObj->save();
     $this->setRequestParameter('oxcid', $this->_oObj->getId());
     $oContent = oxNew('content');
     $oContent->getParsedContent();
     $this->_oObj->oxcontents__oxcontent = new oxField("[{* *}]regenerated", oxField::T_RAW);
     $this->_oObj->save();
     $oContent = oxNew('content');
     $this->assertEquals('regenerated', $oContent->getParsedContent());
 }