/** * 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'])); }
/** * 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; }