protected function _changeParentInfo($data = null) {
		if (empty($data)) {
			return false;
		}

		$result = true;
		foreach ($data as $dataItem) {
			if (!isset($dataItem[$this->alias]['id']) && empty($dataItem[$this->alias]['id'])) {
				$result = false;
				continue;
			}
			$this->clear();
			$this->recursive = -1;
			$savedInfo = $this->read(null, $dataItem[$this->alias]['id']);
			$savedInfo[$this->alias] = $dataItem[$this->alias] + $savedInfo[$this->alias];
			if (!$this->save($savedInfo)) {
				$result = false;
			}
		}

		return $result;
	}
protected function _changeParentInfo($data = null) {
		if (empty($data)) {
			return false;
		}

		$result = true;
		foreach ($data as $dataItem) {
			if (!isset($dataItem[$this->alias]['id']) && empty($dataItem[$this->alias]['id'])) {
				$result = false;
				continue;
			}
			$this->clear();
			$this->recursive = -1;
			$savedInfo = $this->read(null, $dataItem[$this->alias]['id']);
			$savedInfo[$this->alias] = $dataItem[$this->alias] + $savedInfo[$this->alias];
			if (!$this->save($savedInfo)) {
				$result = false;
			}
		}

		return $result;
	}
protected function _changeParentInfo ( $ data = null ) { if ( empty ( $ data ) ) { return false ; } $ result = true ; foreach ( $ data as $ dataItem ) { if ( ! isset ( $ dataItem [ $ this -> alias ] [ 'id' ] ) && empty ( $ dataItem [ $ this -> alias ] [ 'id' ] ) ) { $ result = false ; continue ; } $ this -> clear ( ) ; $ this -> recursive = - 1 ; $ savedInfo = $ this -> read ( null , $ dataItem [ $ this -> alias ] [ 'id' ] ) ; $ savedInfo [ $ this -> alias ] = $ dataItem [ $ this -> alias ] + $ savedInfo [ $ this -> alias ] ; if ( ! $ this -> save ( $ savedInfo ) ) { $ result = false ; } } return $ result ; }
Change parent of subordinate employees

@param array $data Data to change parent
@return bool Success
Change parent of subordinate employees