コード例 #1
0
 /**
  * Gets rootline of a table downwards
  *
  * @param string $theTable: Database table
  * @param string $parentField: Database field to check with third parameter
  * @param mixed $uids: Uids of (different) parents
  * @return string An rootline array
  *
  */
 public static function getRootLineUpwards($theTable, $parentField, $uids)
 {
     if (!is_array($uids)) {
         $uids = tx_cpsdevlib_div::explode($uids);
     }
     $rootLine = array();
     foreach ($uids as $uid) {
         $result = t3lib_BEfunc::getRecordsByField($theTable, 'uid', $uid);
         $rL = array();
         if (count($result)) {
             $rL = self::getRootLineUpwards($theTable, $parentField, $result[0][$parentField]);
         }
         $rootLine[$uid] = $rL;
     }
     return $rootLine;
 }
コード例 #2
0
 /**
  * @test
  * @depends checkRemoveArrayValues
  * @dataProvider testExplodeDataProvider
  * @param string $theDelims
  * @param boolean $useTrim
  * @param boolean $removeEmptyValues
  * @param integer $theLimit
  * @param array $expectedReturnArray
  */
 public function checkExplode($theDelims, $useTrim, $removeEmptyValues, $theLimit, $expectedReturnArray)
 {
     $this->assertEquals($expectedReturnArray, tx_cpsdevlib_div::explode($this->fixture['testString'], $theDelims, $useTrim, $removeEmptyValues, $theLimit));
 }