/** * Gets all associated NarroUserRolesAsRole as an array of NarroUserRole objects * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query * @return NarroUserRole[] */ public function GetNarroUserRoleAsRoleArray($objOptionalClauses = null) { if (is_null($this->intRoleId)) { return array(); } try { return NarroUserRole::LoadArrayByRoleId($this->intRoleId, $objOptionalClauses); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } }
public function dtgRoleUserList_Bind() { $this->dtgRoleUserList->TotalItemCount = NarroUserRole::CountByRoleId($this->objRole->RoleId); // Because we want to enable pagination AND sorting, we need to setup the $objClauses array to send to LoadAll() // Setup the $objClauses Array $objClauses = array(); // If a column is selected to be sorted, and if that column has a OrderByClause set on it, then let's add // the OrderByClause to the $objClauses array if ($objClause = $this->dtgRoleUserList->OrderByClause) { array_push($objClauses, $objClause); } // Add the LimitClause information, as well if ($objClause = $this->dtgRoleUserList->LimitClause) { array_push($objClauses, $objClause); } // Set the DataSource to be the array of all NarroUser objects, given the clauses above $this->dtgRoleUserList->DataSource = NarroUserRole::LoadArrayByRoleId($this->objRole->RoleId, $objClauses); QApplication::ExecuteJavaScript('highlight_datagrid();'); }