Пример #1
0
 /**
  * Returns a table alias for the given column
  *
  * @param string $columnName
  *
  * @return string
  */
 protected function getTableAliasForColumn($columnName)
 {
     $parentJoinId = $this->getParentJoinIdentifier($this->joinIdHelper->buildColumnJoinIdentifier($columnName));
     if (empty($this->tableAliases[$parentJoinId])) {
         return $this->tableAliases[self::ROOT_ALIAS_KEY];
     }
     return $this->tableAliases[$parentJoinId];
 }
 /**
  * @param string $entity
  * @param string $fieldName
  * @return string|null
  */
 public function getContactInformationFieldType($entity, $fieldName)
 {
     $contactInformationType = null;
     $identifierHelper = new JoinIdentifierHelper($entity);
     $className = $identifierHelper->getEntityClassName($fieldName);
     $fieldName = $identifierHelper->getFieldName($fieldName);
     if (!array_key_exists($className, $this->entityContactInfoColumns)) {
         $this->entityContactInfoColumns[$className] = $this->getEntityLevelContactInfoColumns($className);
     }
     if (!empty($this->entityContactInfoColumns[$className][$fieldName])) {
         $contactInformationType = $this->entityContactInfoColumns[$className][$fieldName];
     } elseif ($this->configProvider->hasConfig($className, $fieldName)) {
         $fieldConfiguration = $this->configProvider->getConfig($className, $fieldName);
         $contactInformationType = $fieldConfiguration->get('contact_information');
     }
     return $contactInformationType;
 }
Пример #3
0
 /**
  * Returns a table alias for the given column
  *
  * @param string $columnName
  *
  * @return string
  */
 protected function getTableAliasForColumn($columnName)
 {
     $parentJoinId = $this->getParentJoinIdentifier($this->joinIdHelper->buildColumnJoinIdentifier($columnName));
     return $this->tableAliases[$parentJoinId];
 }
Пример #4
0
 /**
  * @dataProvider getUnidirectionalJoinEntityNameProvider
  */
 public function testGetUnidirectionalJoinEntityName($joinId, $expected)
 {
     $this->assertEquals($expected, $this->helper->getUnidirectionalJoinEntityName($joinId));
 }