protected function _getPosition($entity, $childrenCount = false) {
		extract($this->_config);

		$parent = $this->_getById($entity->$parent);

		if ($entity->$left === ($parent->$left + 1)) {
			return 0;
		}

		if (($entity->$right + 1) === $parent->$right) {
			if ($childrenCount === false) {
				$childrenCount = $parent->childrens(false, 'count');
			}
			return $childrenCount - 1;
		}

		$count = 0;
		$children = $parent->childrens(false);

		$id = $entity->data($model::key());
		foreach ($children as $child) {
			if ($child->data($model::key()) === $id) {
				return $count;
			}
			$count++;
		}

		return false;
	}