function getTwitterAccounts() { $object = new CRM_CiviruleTwitter_BAO_TwitterAccount(); $object->find(); $return = array(); while ($object->fetch()) { $return[$object->id] = '@' . $object->twitter_name . ' - ' . $object->description; } return $return; }
/** * Function to get values * * @return array $result found rows with data * @access public * @static */ public static function getValues($params) { $result = array(); $account = new CRM_CiviruleTwitter_BAO_TwitterAccount(); if (!empty($params)) { $fields = self::fields(); foreach ($params as $key => $value) { if (isset($fields[$key])) { $account->{$key} = $value; } } } $account->find(); while ($account->fetch()) { $row = array(); self::storeValues($account, $row); $result[$row['id']] = $row; } return $result; }