public function getListContain($excludeModels = null, $fields = null, $excludeFields = null) {
		$excludeModels = (array)$excludeModels;
		$fields = (array)$fields;
		$excludeFields = (array)$excludeFields;
		$bindModelCfgFull = $this->_getListBindModelCfg();
		$fieldsContainCheck = array_keys($bindModelCfgFull);
		$listFieldsDb = $this->_modelConfigSync->getListFieldsDb();
		$listFieldsLdap = $this->_modelConfigSync->getListFieldsLdap();
		if (!empty($fields)) {
			$fieldsContainCheck = array_unique(array_merge($fieldsContainCheck, $fields));
		}
		if (!empty($excludeFields)) {
			$fieldsContainCheck = array_diff($fieldsContainCheck, (array)$excludeFields);
		}
		if (!empty($fields)) {
			foreach ($fieldsContainCheck as $i => &$fieldCheck) {
				if ((in_array($fieldCheck, $listFieldsDb) && !in_array($fieldCheck, $fields)) || (
					!in_array($fieldCheck, $listFieldsDb) && !in_array($fieldCheck, $listFieldsLdap))) {
					unset($fieldsContainCheck[$i]);
				}
			}
		}

		$bindModelCfg = $this->_getBindModelCfg($fieldsContainCheck);
		$result = [];
		foreach ($bindModelCfg as $bindType => $targetModels) {
			$result = array_merge($result, array_keys($targetModels));
		}

		if (!empty($excludeModels)) {
			$result = array_values(array_diff($result, $excludeModels));
		}

		return $result;
	}
public function getListContain($excludeModels = null, $fields = null, $excludeFields = null) {
		$excludeModels = (array)$excludeModels;
		$fields = (array)$fields;
		$excludeFields = (array)$excludeFields;
		$bindModelCfgFull = $this->_getListBindModelCfg();
		$fieldsContainCheck = array_keys($bindModelCfgFull);
		$listFieldsDb = $this->_modelConfigSync->getListFieldsDb();
		$listFieldsLdap = $this->_modelConfigSync->getListFieldsLdap();
		if (!empty($fields)) {
			$fieldsContainCheck = array_unique(array_merge($fieldsContainCheck, $fields));
		}
		if (!empty($excludeFields)) {
			$fieldsContainCheck = array_diff($fieldsContainCheck, (array)$excludeFields);
		}
		if (!empty($fields)) {
			foreach ($fieldsContainCheck as $i => &$fieldCheck) {
				if ((in_array($fieldCheck, $listFieldsDb) && !in_array($fieldCheck, $fields)) || (
					!in_array($fieldCheck, $listFieldsDb) && !in_array($fieldCheck, $listFieldsLdap))) {
					unset($fieldsContainCheck[$i]);
				}
			}
		}

		$bindModelCfg = $this->_getBindModelCfg($fieldsContainCheck);
		$result = [];
		foreach ($bindModelCfg as $bindType => $targetModels) {
			$result = array_merge($result, array_keys($targetModels));
		}

		if (!empty($excludeModels)) {
			$result = array_values(array_diff($result, $excludeModels));
		}

		return $result;
	}
public function getListContain ( $ excludeModels = null , $ fields = null , $ excludeFields = null ) { $ excludeModels = ( array ) $ excludeModels ; $ fields = ( array ) $ fields ; $ excludeFields = ( array ) $ excludeFields ; $ bindModelCfgFull = $ this -> _getListBindModelCfg ( ) ; $ fieldsContainCheck = array_keys ( $ bindModelCfgFull ) ; $ listFieldsDb = $ this -> _modelConfigSync -> getListFieldsDb ( ) ; $ listFieldsLdap = $ this -> _modelConfigSync -> getListFieldsLdap ( ) ; if ( ! empty ( $ fields ) ) { $ fieldsContainCheck = array_unique ( array_merge ( $ fieldsContainCheck , $ fields ) ) ; } if ( ! empty ( $ excludeFields ) ) { $ fieldsContainCheck = array_diff ( $ fieldsContainCheck , ( array ) $ excludeFields ) ; } if ( ! empty ( $ fields ) ) { foreach ( $ fieldsContainCheck as $ i => & $ fieldCheck ) { if ( ( in_array ( $ fieldCheck , $ listFieldsDb ) && ! in_array ( $ fieldCheck , $ fields ) ) || ( ! in_array ( $ fieldCheck , $ listFieldsDb ) && ! in_array ( $ fieldCheck , $ listFieldsLdap ) ) ) { unset ( $ fieldsContainCheck [ $ i ] ) ; } } } $ bindModelCfg = $ this -> _getBindModelCfg ( $ fieldsContainCheck ) ; $ result = [ ] ; foreach ( $ bindModelCfg as $ bindType => $ targetModels ) { $ result = array_merge ( $ result , array_keys ( $ targetModels ) ) ; } if ( ! empty ( $ excludeModels ) ) { $ result = array_values ( array_diff ( $ result , $ excludeModels ) ) ; } return $ result ; }
Return list of models for contain behavior

@param array|string $excludeModels List of models for excluding
from result
@param array|string $fields List of fields for checking on
contain associated models
@param array|string $excludeFields List of fields for exclude from
checking on contain associated models
@return array Return list of models for contain behavior.
Return list of models for contain behavior