protected function resolveDropDownVariantAttributeClauseAndStructure()
 {
     $relationClassName = $this->modelRelationsAndAttributesToReportAdapter->getModel()->getRelationModelClassName($this->getRealAttributeName());
     if ($relationClassName == 'MultipleValuesCustomField' || is_subclass_of($relationClassName, 'MultipleValuesCustomField')) {
         $relatedAttributeName = 'values';
     } else {
         $relatedAttributeName = 'value';
     }
     $this->clauses[1] = array('attributeName' => $this->getRealAttributeName(), 'relatedAttributeName' => $relatedAttributeName, 'operatorType' => $this->filter->getOperator(), 'value' => $this->resolveValueForOperator());
     $this->structure = '1';
 }
 /**
  * @param string $nodeId
  * @param ModelRelationsAndAttributesToReportAdapter $modelToReportAdapter
  * @param RedBeanModel $precedingModel
  * @param string $precedingRelation
  */
 protected function resolvePrecedingModelRelationAndAdapterByNodeId($nodeId, &$modelToReportAdapter, &$precedingModel, &$precedingRelation)
 {
     assert('$modelToReportAdapter instanceof ModelRelationsAndAttributesToReportAdapter');
     if ($nodeId == 'source') {
         return;
     }
     $relations = explode(FormModelUtil::RELATION_DELIMITER, $nodeId);
     $lastRelation = end($relations);
     foreach ($relations as $relation) {
         $relationModelClassName = $modelToReportAdapter->getRelationModelClassName($relation);
         $precedingRelation = $relation;
         if ($relation != $lastRelation) {
             $precedingModel = new $relationModelClassName(false);
         } elseif (count($relations) == 1) {
             $precedingModel = $modelToReportAdapter->getModel();
         }
         $modelToReportAdapter = $this->makeModelRelationsAndAttributesToReportAdapter($relationModelClassName::getModuleClassName(), $relationModelClassName);
     }
 }