|
|
|
@ -23,7 +23,7 @@
|
|
|
|
|
| GNU Affero General Public License or the licensing of CiviCRM, |
|
|
|
|
|
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
|
|
|
|
+--------------------------------------------------------------------+
|
|
|
|
|
*/
|
|
|
|
|
*/
|
|
|
|
|
/**
|
|
|
|
|
* @package CRM
|
|
|
|
|
* @copyright CiviCRM LLC (c) 2004-2017
|
|
|
|
@ -48,7 +48,7 @@ class CRM_Grant_DAO_GrantBudget extends CRM_Core_DAO {
|
|
|
|
|
*
|
|
|
|
|
* @var boolean
|
|
|
|
|
*/
|
|
|
|
|
static $_log = true;
|
|
|
|
|
static $_log = TRUE;
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @var int unsigned
|
|
|
|
@ -58,7 +58,7 @@ class CRM_Grant_DAO_GrantBudget extends CRM_Core_DAO {
|
|
|
|
|
public $fiscal_year;
|
|
|
|
|
public $budget;
|
|
|
|
|
|
|
|
|
|
function __construct() {
|
|
|
|
|
public function __construct() {
|
|
|
|
|
$this->__table = 'civicrm_grant_budget';
|
|
|
|
|
parent::__construct();
|
|
|
|
|
}
|
|
|
|
@ -68,10 +68,10 @@ class CRM_Grant_DAO_GrantBudget extends CRM_Core_DAO {
|
|
|
|
|
* @return array
|
|
|
|
|
* [CRM_Core_Reference_Interface]
|
|
|
|
|
*/
|
|
|
|
|
static function getReferenceColumns() {
|
|
|
|
|
public static function getReferenceColumns() {
|
|
|
|
|
if (!isset(Civi::$statics[__CLASS__]['links'])) {
|
|
|
|
|
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
|
|
|
|
|
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'financialtypeid', 'civicrm_financial_type', 'id');
|
|
|
|
|
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'financialtypeid', 'civicrm_financial_type', 'id');
|
|
|
|
|
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
|
|
|
|
|
}
|
|
|
|
|
return Civi::$statics[__CLASS__]['links'];
|
|
|
|
@ -81,13 +81,13 @@ class CRM_Grant_DAO_GrantBudget extends CRM_Core_DAO {
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
static function &fields() {
|
|
|
|
|
public static function &fields() {
|
|
|
|
|
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
|
|
|
|
|
Civi::$statics[__CLASS__]['fields'] = [
|
|
|
|
|
'id' => [
|
|
|
|
|
'name' => 'id',
|
|
|
|
|
'type' => CRM_Utils_Type::T_INT,
|
|
|
|
|
'required' => true,
|
|
|
|
|
'required' => TRUE,
|
|
|
|
|
'table_name' => 'civicrm_grant_budget',
|
|
|
|
|
'entity' => 'GrantBudget',
|
|
|
|
|
'bao' => 'CRM_Grant_BAO_GrantBudget',
|
|
|
|
@ -165,7 +165,7 @@ class CRM_Grant_DAO_GrantBudget extends CRM_Core_DAO {
|
|
|
|
|
* @return array
|
|
|
|
|
* Array(string $name => string $uniqueName).
|
|
|
|
|
*/
|
|
|
|
|
static function &fieldKeys() {
|
|
|
|
|
public static function &fieldKeys() {
|
|
|
|
|
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
|
|
|
|
|
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
|
|
|
|
|
}
|
|
|
|
@ -176,15 +176,15 @@ class CRM_Grant_DAO_GrantBudget extends CRM_Core_DAO {
|
|
|
|
|
*
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
static function getTableName() {
|
|
|
|
|
public static function getTableName() {
|
|
|
|
|
return self::$_tableName;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Returns if this table needs to be logged
|
|
|
|
|
*
|
|
|
|
|
* @return boolean
|
|
|
|
|
* @return bool
|
|
|
|
|
*/
|
|
|
|
|
function getLog() {
|
|
|
|
|
public function getLog() {
|
|
|
|
|
return self::$_log;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
@ -194,7 +194,7 @@ class CRM_Grant_DAO_GrantBudget extends CRM_Core_DAO {
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
static function &import($prefix = false) {
|
|
|
|
|
public static function &import($prefix = FALSE) {
|
|
|
|
|
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'grant_budget', $prefix, []);
|
|
|
|
|
return $r;
|
|
|
|
|
}
|
|
|
|
@ -205,7 +205,7 @@ class CRM_Grant_DAO_GrantBudget extends CRM_Core_DAO {
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
static function &export($prefix = false) {
|
|
|
|
|
public static function &export($prefix = FALSE) {
|
|
|
|
|
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'grant_budget', $prefix, []);
|
|
|
|
|
return $r;
|
|
|
|
|
}
|
|
|
|
@ -216,4 +216,5 @@ class CRM_Grant_DAO_GrantBudget extends CRM_Core_DAO {
|
|
|
|
|
$indices = [];
|
|
|
|
|
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|