Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
hschottm committed Nov 13, 2018
1 parent 85cc82a commit 2e26455
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 28 deletions.
4 changes: 4 additions & 0 deletions src/Resources/contao/models/FEFaqModel.php
Expand Up @@ -12,6 +12,7 @@ class FEFaqModel extends \Contao\FaqModel
*
* @return \Model\Collection|\FaqModel|null A collection of models or null if there are no FAQs
*/
/*
public static function findPublishedByViewCount(array $arrOptions=array())
{
$t = static::$strTable;
Expand All @@ -26,6 +27,7 @@ public static function findPublishedByViewCount(array $arrOptions=array())
return static::findBy($arrColumns, 0, $arrOptions);
}
*/

/**
* Find all published FAQs by their recommendation flag
Expand All @@ -34,6 +36,7 @@ public static function findPublishedByViewCount(array $arrOptions=array())
*
* @return \Model\Collection|\FaqModel|null A collection of models or null if there are no FAQs
*/
/*
public static function findPublishedByRecommendation(array $arrOptions=array())
{
$t = static::$strTable;
Expand Down Expand Up @@ -67,4 +70,5 @@ public static function findPublishedByRecommendation(array $arrOptions=array())
return static::findBy($arrColumns, 1, $arrOptions);
}
*/
}
2 changes: 2 additions & 0 deletions src/Resources/contao/modules/ModuleFEFaqPage.php
Expand Up @@ -6,6 +6,7 @@

class ModuleFEFaqPage extends \Contao\ModuleFaqPage
{
/*
protected function compile()
{
\Contao\ModuleFaqPage::compile();
Expand All @@ -21,4 +22,5 @@ protected function compile()
}
}
}
*/
}
2 changes: 2 additions & 0 deletions src/Resources/contao/modules/ModuleFEFaqReader.php
Expand Up @@ -4,6 +4,7 @@

class ModuleFEFaqReader extends \Contao\ModuleFaqReader
{
/*
protected function compile()
{
\Contao\ModuleFaqReader::compile();
Expand All @@ -14,4 +15,5 @@ protected function compile()
$objFaq->save();
}
}
*/
}
16 changes: 2 additions & 14 deletions src/Resources/contao/modules/ModuleFEFaqRecommendedList.php
Expand Up @@ -4,22 +4,13 @@

class ModuleFEFaqRecommendedList extends \Contao\ModuleFaqList
{
/**
* Template
* @var string
*/
/*
protected $strTemplate = 'mod_faqlist_top';
/**
* Display a wildcard in the back end
*
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE')
{
/** @var \BackendTemplate|object $objTemplate */
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['faqrecommendedlist'][0]) . ' ###';
Expand All @@ -41,9 +32,6 @@ public function generate()
}
/**
* Generate the module
*/
protected function compile()
{
$objFaq = \Hschottm\FaqExtensionsBundle\FEFaqModel::findPublishedByRecommendation(array("order" => $this->faq_sortorder, "limit" => (($this->faq_limit > 0) ? $this->faq_limit : 10)));
Expand All @@ -64,7 +52,6 @@ protected function compile()
$arrTemp['title'] = specialchars($objFaq->question, true);
$arrTemp['href'] = $this->generateFaqLink($objFaq);
/** @var \FaqCategoryModel $objPid */
$objPid = $objFaq->getRelated('pid');
array_push($arrFaq, $arrTemp);
Expand All @@ -81,4 +68,5 @@ protected function compile()
$this->Template->faq = $arrFaq;
}
*/
}
16 changes: 2 additions & 14 deletions src/Resources/contao/modules/ModuleFEFaqTopList.php
Expand Up @@ -4,22 +4,13 @@

class ModuleFEFaqTopList extends \Contao\ModuleFaqList
{
/**
* Template
* @var string
*/
/*
protected $strTemplate = 'mod_faqlist_top';
/**
* Display a wildcard in the back end
*
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE')
{
/** @var \BackendTemplate|object $objTemplate */
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['faqtoplist'][0]) . ' ###';
Expand All @@ -41,9 +32,6 @@ public function generate()
}
/**
* Generate the module
*/
protected function compile()
{
$objFaq = \Hschottm\FaqExtensionsBundle\FEFaqModel::findPublishedByViewCount(array("limit" => (($this->faq_limit > 0) ? $this->faq_limit : 10)));
Expand All @@ -64,7 +52,6 @@ protected function compile()
$arrTemp['title'] = specialchars($objFaq->question, true);
$arrTemp['href'] = $this->generateFaqLink($objFaq);
/** @var \FaqCategoryModel $objPid */
$objPid = $objFaq->getRelated('pid');
array_push($arrFaq, $arrTemp);
Expand All @@ -81,4 +68,5 @@ protected function compile()
$this->Template->faq = $arrFaq;
}
*/
}

0 comments on commit 2e26455

Please sign in to comment.