예제 #1
0
 /**
  * @param $onTableAliasName
  * @param bool $canUseFromJoins
  * @return null|string
  */
 protected function resolveJoinsForAttribute($onTableAliasName, $canUseFromJoins = true)
 {
     assert('is_string($onTableAliasName)');
     assert('is_bool($canUseFromJoins)');
     if ($this->modelAttributeToDataProviderAdapter->isAttributeDerivedRelationViaCastedUpModel()) {
         return $this->resolveJoinsForDerivedRelationViaCastedUpModel($onTableAliasName, $canUseFromJoins);
     } elseif ($this->modelAttributeToDataProviderAdapter->isInferredRelation()) {
         return $this->resolveJoinsForInferredRelation($onTableAliasName, $canUseFromJoins);
     } elseif ($this->modelAttributeToDataProviderAdapter->isAttributeOnDifferentModel()) {
         return $this->resolveJoinsForAttributeOnDifferentModel($onTableAliasName, $canUseFromJoins);
     } elseif ($this->modelAttributeToDataProviderAdapter->isRelation()) {
         return $this->resolveJoinsForAttributeOnSameModelThatIsARelation($onTableAliasName);
     } else {
         return $this->resolveJoinsForAttributeOnSameModelThatIsNotARelation($onTableAliasName);
     }
 }