Exemplo n.º 1
0
 /**
  * Run any dependency that fields may have
  *
  * @return void
  */
 function updateDependentField($filter_fields = null)
 {
     // This is ignored when coming via a webservice as it's only needed for display and not just raw data.
     // It results in a huge performance gain when pulling multiple records via webservices.
     if (!isset($GLOBALS['service_object']) && !$this->is_updated_dependent_fields) {
         require_once "include/Expressions/DependencyManager.php";
         if (empty($filter_fields)) {
             $filterFields = $this->field_defs;
         } else {
             $filterFields = array_intersect_key($this->field_defs, $filter_fields);
         }
         $deps = DependencyManager::getDependentFieldDependencies($filterFields);
         foreach ($deps as $dep) {
             if ($dep->getFireOnLoad()) {
                 $dep->fire($this);
             }
         }
     }
 }