Merge pull request #9779 from WeMoveEU/CRM-19963
[civicrm-core.git] / CRM / ACL / DAO / EntityRole.php
index 3a106d89048f0268935328cb9b99e362c7463b74..5ecda4016a70b9b9147d070895d9c3f4d3c7d2f1 100644 (file)
  *
  * Generated from xml/schema/CRM/ACL/EntityRole.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:9ec4917a20273426112e2d0df3e985d1)
+ * (GenCodeChecksum:b6780a8cf74433fd38a0c7f9e6161986)
  */
 require_once 'CRM/Core/DAO.php';
 require_once 'CRM/Utils/Type.php';
+/**
+ * CRM_ACL_DAO_EntityRole constructor.
+ */
 class CRM_ACL_DAO_EntityRole extends CRM_Core_DAO {
   /**
-   * static instance to hold the table name
+   * Static instance to hold the table name.
    *
    * @var string
    */
   static $_tableName = 'civicrm_acl_entity_role';
   /**
-   * static value to see if we should log any modifications to
-   * this table in the civicrm_log table
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
    *
    * @var boolean
    */
@@ -79,16 +81,14 @@ class CRM_ACL_DAO_EntityRole extends CRM_Core_DAO {
    */
   public $is_active;
   /**
-   * class constructor
-   *
-   * @return civicrm_acl_entity_role
+   * Class constructor.
    */
   function __construct() {
     $this->__table = 'civicrm_acl_entity_role';
     parent::__construct();
   }
   /**
-   * Returns foreign keys and entity references
+   * Returns foreign keys and entity references.
    *
    * @return array
    *   [CRM_Core_Reference_Interface]
@@ -115,6 +115,10 @@ class CRM_ACL_DAO_EntityRole extends CRM_Core_DAO {
           'title' => ts('Entity Role') ,
           'description' => 'Unique table ID',
           'required' => true,
+          'table_name' => 'civicrm_acl_entity_role',
+          'entity' => 'EntityRole',
+          'bao' => 'CRM_ACL_BAO_EntityRole',
+          'localizable' => 0,
         ) ,
         'acl_role_id' => array(
           'name' => 'acl_role_id',
@@ -122,6 +126,10 @@ class CRM_ACL_DAO_EntityRole extends CRM_Core_DAO {
           'title' => ts('ACL Role ID') ,
           'description' => 'Foreign Key to ACL Role (which is an option value pair and hence an implicit FK)',
           'required' => true,
+          'table_name' => 'civicrm_acl_entity_role',
+          'entity' => 'EntityRole',
+          'bao' => 'CRM_ACL_BAO_EntityRole',
+          'localizable' => 0,
         ) ,
         'entity_table' => array(
           'name' => 'entity_table',
@@ -131,6 +139,10 @@ class CRM_ACL_DAO_EntityRole extends CRM_Core_DAO {
           'required' => true,
           'maxlength' => 64,
           'size' => CRM_Utils_Type::BIG,
+          'table_name' => 'civicrm_acl_entity_role',
+          'entity' => 'EntityRole',
+          'bao' => 'CRM_ACL_BAO_EntityRole',
+          'localizable' => 0,
         ) ,
         'entity_id' => array(
           'name' => 'entity_id',
@@ -138,12 +150,20 @@ class CRM_ACL_DAO_EntityRole extends CRM_Core_DAO {
           'title' => ts('ACL Entity ID') ,
           'description' => 'ID of the group/contact object being joined',
           'required' => true,
+          'table_name' => 'civicrm_acl_entity_role',
+          'entity' => 'EntityRole',
+          'bao' => 'CRM_ACL_BAO_EntityRole',
+          'localizable' => 0,
         ) ,
         'is_active' => array(
           'name' => 'is_active',
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('ACL Entity Role is Active') ,
           'description' => 'Is this property active?',
+          'table_name' => 'civicrm_acl_entity_role',
+          'entity' => 'EntityRole',
+          'bao' => 'CRM_ACL_BAO_EntityRole',
+          'localizable' => 0,
         ) ,
       );
       CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
@@ -200,4 +220,29 @@ class CRM_ACL_DAO_EntityRole extends CRM_Core_DAO {
     $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'acl_entity_role', $prefix, array());
     return $r;
   }
+  /**
+   * Returns the list of indices
+   */
+  public static function indices($localize = TRUE) {
+    $indices = array(
+      'index_role' => array(
+        'name' => 'index_role',
+        'field' => array(
+          0 => 'acl_role_id',
+        ) ,
+        'localizable' => false,
+        'sig' => 'civicrm_acl_entity_role::0::acl_role_id',
+      ) ,
+      'index_entity' => array(
+        'name' => 'index_entity',
+        'field' => array(
+          0 => 'entity_table',
+          1 => 'entity_id',
+        ) ,
+        'localizable' => false,
+        'sig' => 'civicrm_acl_entity_role::0::entity_table::entity_id',
+      ) ,
+    );
+    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+  }
 }