コード例 #1
0
ファイル: Leaf.php プロジェクト: BenjaminBeck/commerce
 /**
  * Returns whether we have at least 1 subitem for a specific parent row.
  *
  * @param array $row Parent Row Information
  *
  * @return bool
  */
 public function hasSubitems(array $row)
 {
     if (!is_array($row)) {
         if (TYPO3_DLOG) {
             GeneralUtility::devLog('hasSubitems (leaf) gets passed invalid parameters.', COMMERCE_EXTKEY, 3);
         }
         return false;
     }
     return !empty($this->data->getChildrenByPid($row['uid']));
 }
コード例 #2
0
ファイル: MasterData.php プロジェクト: BenjaminBeck/commerce
 /**
  * Loads the records of a given query and stores it.
  *
  * @return array Records array
  */
 public function loadRecords()
 {
     $rows = parent::loadRecords();
     // Add the root if it is the starting ID or in the mounts
     if (!$this->ignoreMounts && (!$this->useMountpoints && $this->uid == 0 || $this->useMountpoints && in_array(0, $this->mountIds))) {
         $rows['uid'][0] = $this->getRootRecord();
     }
     $this->records = $rows;
     return $rows;
 }