public function getStartingPoint() { $startingpoint = array(); // if loadFlexformsFromOtherCE is set // try to get startingPoint of given page if ($uid = intval($this->pObj->conf['loadFlexformsFromOtherCE'])) { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('pages, recursive', 'tt_content', 'uid = ' . $uid, '', '', ''); if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) { $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); $startingpoint['pages'] = $row['pages']; $startingpoint['recursive'] = $row['recursive']; } } else { // if loadFlexformsFromOtherCE is NOT set // get startingPoints of current page $startingpoint['pages'] = $this->pObj->cObj->data['pages']; $startingpoint['recursive'] = $this->pObj->cObj->data['recursive']; } // allow to override startingpoint with typoscript like this // plugin.tx_kesearch_pi1.overrideStartingPoint = 123 // plugin.tx_kesearch_pi1.overrideStartingPointRecursive = 1 if ($this->pObj->conf['overrideStartingPoint']) { $startingpoint['pages'] = $this->pObj->conf['overrideStartingPoint']; $startingpoint['recursive'] = $this->pObj->conf['overrideStartingPointRecursive']; } return $this->pObj->pi_getPidList($startingpoint['pages'], $startingpoint['recursive']); }
public function setUp() { $this->pObj = $this->getMock('tx_kesearch_pi1'); $this->pObj->expects($this->any())->method('pi_getLL')->will($this->returnValue('Suchbegriff')); $this->div = new tx_kesearch_lib_div(); }