/** * Returns an array containing the ACL world access setting for the currently load row. The array * Array keys are: * access [access level as integer value] * access_display [access level as display text] * * @param array $pa_options Supported options: * No options currently supported * * @return array Information about current ACL world setting */ public function getACLWorldAccess($pa_options = null) { if (!($vn_id = (int) $this->getPrimaryKey())) { return null; } if (!is_array($pa_options)) { $pa_options = array(); } $o_db = $this->getDb(); $qr_res = $o_db->query("\n\t\t\tSELECT acl.*\n\t\t\tFROM ca_acl acl\n\t\t\tWHERE\n\t\t\t\tacl.table_num = ? AND acl.row_id = ? AND acl.group_id IS NULL AND acl.user_id IS NULL\n\t\t", $this->tableNum(), $vn_id); $t_acl = new ca_acl(); $va_row = array(); if ($qr_res->nextRow()) { foreach (array('access') as $vs_f) { $va_row[$vs_f] = $qr_res->get($vs_f); } $va_row['access_display'] = $t_acl->getChoiceListValue('access', $va_row['access']); } if (!strlen($va_row['access_display'])) { // show default $va_row['access_display'] = $t_acl->getChoiceListValue('access', $this->getAppConfig()->get('default_item_access_level')); } return $va_row; }